From ac03605f9b2a0ed3349091f9c5f676b25e355046 Mon Sep 17 00:00:00 2001 From: BlackDeluxeCat <65377021+BlackDeluxeCat@users.noreply.github.com> Date: Sat, 30 Dec 2023 15:42:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=BA=86=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=A0=8F=E5=8C=BA=E5=9F=9F=E7=9A=84=E8=A3=81=E5=89=AA=E5=BC=8F?= =?UTF-8?q?=E6=BB=91=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mi2u/ui/elements/Mindow2.java | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/mi2u/ui/elements/Mindow2.java b/src/mi2u/ui/elements/Mindow2.java index 4c0933c..fad9882 100644 --- a/src/mi2u/ui/elements/Mindow2.java +++ b/src/mi2u/ui/elements/Mindow2.java @@ -100,23 +100,8 @@ public void minimize(){ } public void setupTitle(){ - titleBar.add(new ScrollPane(titlePane){ - @Override - public float getPrefWidth(){ - return 0f; - } - }).scrollX(true).scrollY(false).with(sp -> { - sp.update(() -> { - Element e = Core.scene.hit(Core.input.mouseX(), Core.input.mouseY(), true); - if(e != null && e.isDescendantOf(sp)){ - sp.requestScroll(); - }else if(sp.hasScroll()){ - Core.scene.setScrollFocus(null); - } - }); - sp.setFadeScrollBars(true); - sp.setupFadeScrollBars(0.3f, 0f); - }).growX().right().get().hovered(() -> titleCfg = false); + titlePane.touchable = Touchable.enabled; + titleBar.add(new MCollapser(titlePane, false).setCollapsed(() -> minimized)).growX().get().hovered(() -> titleCfg = false); titleBar.image().width(2f).growY().color(Color.white); var toast = new Table();