让鼠标滚轮能滚列表:把列表 ScrollPane 的 touchable 从默认 childrenOnly 改成 enabled(无参返回枚举的方法=getTouchable,枚举 dv 第0常量=enabled)
- 诊断证据:程序化 scrollY(200) 生效(before=0 after=200),说明可滚范围没问题, 是滚轮事件没送到面板 —— 因为 childrenOnly 时 ScrollPane 自己不是命中目标,收不到 enter、 也就不会 setScrollFocus。 - 顺带把这条 Actor/Touchable 映射写进 anchors.tsv + names.tsv。
This commit is contained in:
1 parent
d59287937d
commit
13bce4509d
3 files changed
+73
No files matched your search
@@ -87,3 +87,9 @@ dR S (F)LdR; minWidth
|
||||
dR C (F)LdR; minHeight
|
||||
dR Z (F)LdR; prefWidth
|
||||
dR V (F)LdR; prefHeight
|
||||
# ---- Actor 的 Touchable(点击/进入命中相关;用于让 ScrollPane 收到鼠标进入→拿到 scroll focus)----
|
||||
# 定位方式(不靠名字):`Actor.getTouchable()` = **无参且返回枚举**的那个方法;枚举类 = dv;
|
||||
# libGDX Touchable 声明顺序 enabled/disabled/childrenOnly → 第 0 个常量就是 enabled。
|
||||
# 现象佐证:ScrollPane 默认 childrenOnly 时自己不是命中目标,收不到 enter → 滚轮事件不会送到它,
|
||||
# 但程序化 scrollY() 是生效的(实测 before=0 after=200)。
|
||||
dl L (Ldv;)V setTouchable
|
||||
|
Can't render this file because it contains an unexpected character in line 72 and column 99.
|
@@ -143,6 +143,7 @@ dl I ()Z isTouchable
|
||||
dl L ()V clear
|
||||
dl L ()Z hasParent
|
||||
dl L (Ldn;)Z addCaptureListener
|
||||
dl L (Ldv;)V setTouchable
|
||||
dl S (FF)V setOrigin
|
||||
dl S (Lde;)Lde; localToStageCoordinates
|
||||
dl V ()V toBack
|
||||
|
||||
|
Reference in new issue
Block a user