OSDN Git Service

hit() now must respect touchable and visible. Touchable only applies to the actor...
authornathan.sweet <nathan.sweet@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Fri, 13 Jul 2012 07:06:43 +0000 (07:06 +0000)
committernathan.sweet <nathan.sweet@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Fri, 13 Jul 2012 07:06:43 +0000 (07:06 +0000)
commit7d81d2b191545be6781d5bc6483c4dc474ce9b09
tree96363c5b5057346dddacd95f894eadb40f4802a8
parentc8dbdff5623214b09bbec17a522e381917b75f3d
hit() now must respect touchable and visible. Touchable only applies to the actor itself, child actors can still be hit. This allows actors (like Table) to be invisible to touch events.
Table has touchable false by default.
cancelTouchFocus is a monster. :( Has to be this way to be reentrant and not cause problems when used from other events. There are probably still some problematic scenarios, but this hopefully covers the common ones.
15 files changed:
gdx/src/com/badlogic/gdx/scenes/scene2d/Actor.java
gdx/src/com/badlogic/gdx/scenes/scene2d/Group.java
gdx/src/com/badlogic/gdx/scenes/scene2d/Stage.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Button.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/ScrollPane.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Table.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Widget.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Window.java
gdx/src/com/badlogic/gdx/scenes/scene2d/utils/PressedListener.java
gdx/src/com/badlogic/gdx/utils/Array.java
gdx/src/com/badlogic/gdx/utils/Pools.java
gdx/src/com/badlogic/gdx/utils/SnapshotArray.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TableLayoutTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/UITest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/YDownTest.java