diff options
| author | Pedro J. Estébanez | 2017-02-04 16:57:11 +0100 |
|---|---|---|
| committer | Pedro J. Estébanez | 2017-02-10 20:54:54 +0100 |
| commit | 49e7e2cd2ac832c333a151ab31ef543fc4a31b28 (patch) | |
| tree | 9bbd74bb83ba6524d0e7ba8ec42b470e02c94f33 /scene/2d/screen_button.h | |
| parent | 86a04198d96820b853bec79165b738a841142768 (diff) | |
| download | godot-49e7e2cd2ac832c333a151ab31ef543fc4a31b28.tar.gz godot-49e7e2cd2ac832c333a151ab31ef543fc4a31b28.tar.zst godot-49e7e2cd2ac832c333a151ab31ef543fc4a31b28.zip | |
Solve TouchScreenButtons issues
Fix touch button needing double tap after pause (applies to those not set to pass-by)
Fix error when a pressed TouchScreenButton with no associated action exits the tree
(with some refactoring of duplicate code)
Diffstat (limited to 'scene/2d/screen_button.h')
| -rw-r--r-- | scene/2d/screen_button.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/screen_button.h b/scene/2d/screen_button.h index 34e02d644..a2df03204 100644 --- a/scene/2d/screen_button.h +++ b/scene/2d/screen_button.h @@ -51,12 +51,16 @@ private: StringName action; bool passby_press; int finger_pressed; + bool allow_repress; int action_id; VisibilityMode visibility; void _input(const InputEvent& p_Event); + void _press(int p_finger_pressed); + void _release(bool p_exiting_tree=false); + protected: void _notification(int p_what); |
