mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-12-21 23:25:56 +00:00
Add basic touchscreen support for sliders.
This commit is contained in:
parent
5852285dd4
commit
8ee1c05512
|
@ -306,6 +306,8 @@ func range_focused():
|
|||
tokens.append("range")
|
||||
tokens.append("minimum %s" % node.min_value)
|
||||
tokens.append("maximum %s" % node.max_value)
|
||||
if OS.has_touchscreen_ui_hint():
|
||||
tokens.append("Swipe up and down to change.")
|
||||
TTS.speak(tokens.join(": "), false)
|
||||
|
||||
|
||||
|
|
|
@ -179,11 +179,21 @@ func swipe_left():
|
|||
|
||||
|
||||
func swipe_up():
|
||||
TTS.speak("Swipe up")
|
||||
var focus = find_focusable_control(get_tree().root)
|
||||
if focus:
|
||||
focus = focus.get_focus_owner()
|
||||
if focus:
|
||||
if focus is Range:
|
||||
_press_and_release("ui_right")
|
||||
|
||||
|
||||
func swipe_down():
|
||||
TTS.speak("Swipe down")
|
||||
var focus = find_focusable_control(get_tree().root)
|
||||
if focus:
|
||||
focus = focus.get_focus_owner()
|
||||
if focus:
|
||||
if focus is Range:
|
||||
_press_and_release("ui_left")
|
||||
|
||||
|
||||
var touch_index = null
|
||||
|
|
Loading…
Reference in New Issue
Block a user