From d59287937de8cb6f58f1594f87e042a1643a1757 Mon Sep 17 00:00:00 2001 From: tianmo Date: Fri, 16 Oct 2026 16:15:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=BB=9A=E5=8A=A8=EF=BC=88?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E7=89=88=EF=BC=89=EF=BC=9A=E7=BB=99=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=85=83=E6=A0=BC=E5=9B=BA=E5=AE=9A=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=20360=EF=BC=88Cell.height=20=E8=BD=BD=E8=8D=B7?= =?UTF-8?q?=E5=90=8D=20I=EF=BC=8C(F)LdR;=20=E6=8C=87=E7=BA=B9=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=EF=BC=89+=20setForceScroll(false,true)=EF=BC=88Scroll?= =?UTF-8?q?Pane.I(ZZ)V=20=E6=8C=87=E7=BA=B9=E7=A1=AE=E8=AE=A4=EF=BC=89?= =?UTF-8?q?=EF=BC=9B=E5=B9=B6=E6=8A=8A=20setForceScroll/setOverscroll/Cell?= =?UTF-8?q?=20=E5=B0=BA=E5=AF=B8=E6=96=B9=E6=B3=95=E5=86=99=E8=BF=9B=20anc?= =?UTF-8?q?hors.tsv+names.tsv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/deobf/anchors.tsv | 13 +++++++++++++ tools/deobf/names.tsv | 9 +++++++++ viewpanel/src/com/spineview/ObjectPanel.java | 10 ++++++++++ 3 files changed, 32 insertions(+) diff --git a/tools/deobf/anchors.tsv b/tools/deobf/anchors.tsv index b1a6a01..4a30262 100644 --- a/tools/deobf/anchors.tsv +++ b/tools/deobf/anchors.tsv @@ -74,3 +74,16 @@ com/badlogic/gdx/scenes/scene2d/ui/ScrollPane B (ZZ)V setScrollingDisabled com/badlogic/gdx/scenes/scene2d/ui/ScrollPane L (FFFF)V scrollTo com/badlogic/gdx/scenes/scene2d/ui/ScrollPane D (Ldl;)V addActor com/badlogic/gdx/scenes/scene2d/ui/ScrollPane D (Ldl;Z)Z removeActor +# ---- ScrollPane / Cell 的滚动与尺寸方法(用于把面板列表改成可滚动;依据:MapMethods 指纹比对)---- +# ScrollPane:B(ZZ)V=setScrollingDisabled、I(ZZ)V=setForceScroll、L(ZZ)V=setOverscroll +#(候选顺序 size/… 已核对;踩坑:把 B(ZZ) 当 setForceScroll 用,等于关掉纵向滚动) +com/badlogic/gdx/scenes/scene2d/ui/ScrollPane I (ZZ)V setForceScroll +com/badlogic/gdx/scenes/scene2d/ui/ScrollPane L (ZZ)V setOverscroll +# Cell 的 (F)LdR; 成组按声明顺序:B=size L=width I=height S=minWidth C=minHeight Z=prefWidth V=prefHeight +dR B (F)LdR; size +dR L (F)LdR; width +dR I (F)LdR; height +dR S (F)LdR; minWidth +dR C (F)LdR; minHeight +dR Z (F)LdR; prefWidth +dR V (F)LdR; prefHeight diff --git a/tools/deobf/names.tsv b/tools/deobf/names.tsv index 4f89b41..dd6491d 100644 --- a/tools/deobf/names.tsv +++ b/tools/deobf/names.tsv @@ -52,8 +52,10 @@ com/badlogic/gdx/scenes/scene2d/ui/ScrollPane D (ILdl;)V addActorAt com/badlogic/gdx/scenes/scene2d/ui/ScrollPane D (Lcom/badlogic/gdx/scenes/scene2d/ui/ScrollPane$ScrollPaneStyle;)V setStyle com/badlogic/gdx/scenes/scene2d/ui/ScrollPane D (Ldl;)V addActor com/badlogic/gdx/scenes/scene2d/ui/ScrollPane D (Ldl;Z)Z removeActor +com/badlogic/gdx/scenes/scene2d/ui/ScrollPane I (ZZ)V setForceScroll com/badlogic/gdx/scenes/scene2d/ui/ScrollPane L (FFFF)V scrollTo com/badlogic/gdx/scenes/scene2d/ui/ScrollPane L (Ldl;)Z removeActor +com/badlogic/gdx/scenes/scene2d/ui/ScrollPane L (ZZ)V setOverscroll com/badlogic/gdx/scenes/scene2d/ui/Slider D ()Lcom/badlogic/gdx/scenes/scene2d/ui/Slider$SliderStyle; getStyle com/badlogic/gdx/scenes/scene2d/ui/Slider D ([FF)V setSnapToValues com/badlogic/gdx/scenes/scene2d/ui/Slider init ()Z isDragging @@ -78,10 +80,12 @@ com/badlogic/gdx/scenes/scene2d/ui/Window D (LJ;FFFFF)V drawStageBackground com/badlogic/gdx/scenes/scene2d/ui/Window D (Lcom/badlogic/gdx/scenes/scene2d/ui/Window$WindowStyle;)V setStyle com/badlogic/gdx/scenes/scene2d/ui/Window StackMapTable ()F getPrefWidth dR B ()V row +dR B (F)LdR; size dR B (LdR;)V merge dR B (LeN;)LdR; height dR B (Z)LdR; uniform dR C ()LdR; left +dR C (F)LdR; minHeight dR C (LeN;)LdR; prefWidth dR Code (LeN;)LdR; spaceRight dR D ()LdR; fill @@ -94,14 +98,19 @@ dR D (Z)LdR; fill dR D (ZZ)LdR; uniform dR F ()LdR; grow dR F (LeN;)LdR; spaceBottom +dR I (F)LdR; height dR I (LeN;)LdR; minHeight dR L ()V clear +dR L (F)LdR; width dR L (LeN;)LdR; minWidth dR S ()LdR; top +dR S (F)LdR; minWidth dR SourceFile (LeN;)LdR; padRight dR StackMapTable ()LdR; expand dR String ()LdR; uniform +dR V (F)LdR; prefHeight dR V (LeN;)LdR; space +dR Z (F)LdR; prefWidth dR Z (LeN;)LdR; prefHeight dR toString ()Ljava/lang/String; toString dl B ()V clearListeners diff --git a/viewpanel/src/com/spineview/ObjectPanel.java b/viewpanel/src/com/spineview/ObjectPanel.java index 41d871d..b9fcd20 100644 --- a/viewpanel/src/com/spineview/ObjectPanel.java +++ b/viewpanel/src/com/spineview/ObjectPanel.java @@ -126,6 +126,13 @@ public final class ObjectPanel { cell = call(root, Obf.TABLE_ADD, new Class[] {actorClass}, cellClass, scroll); layoutCell(cell, Obf.CELL_TOP, Obf.CELL_EXPAND, Obf.CELL_FILL); state.listCell = cell; + try { + // 给列表一个**固定高度**:这样 ScrollPane 必定比内容矮,可滚范围(maxY)一定 > 0。 + // Cell.height(float) 的载荷名是 `I`(描述符 (F)LdR;,MapMethods 指纹确认)。 + call(cell, "I", new Class[] {float.class}, cellClass, Float.valueOf(360f)); + } catch (Throwable error) { + System.err.println("[panel] 列表固定高度设置失败: " + error); + } wire(loader, refresh, new Runnable() { @Override @@ -553,6 +560,9 @@ public final class ObjectPanel { method.invoke(state.listScroll, Boolean.FALSE, Boolean.FALSE); break; } + // 再打开"强制纵向滚动":setForceScroll 在载荷里叫 `I`((ZZ)V,指纹确认 ~2/3) + call(state.listScroll, "I", new Class[] {boolean.class, boolean.class}, void.class, + Boolean.FALSE, Boolean.TRUE); } catch (Throwable error) { System.err.println("[panel] 恢复滚动失败: " + error); }