Add controller ui
This commit is contained in:
@@ -17,3 +17,14 @@ func close() -> void:
|
||||
visible = false
|
||||
MAIN.close()
|
||||
SETTINGS.close()
|
||||
|
||||
func _unhandled_input(event:InputEvent) -> void:
|
||||
if !visible:
|
||||
return
|
||||
if event.is_action_pressed("ui_cancel"):
|
||||
if SETTINGS.isOpen():
|
||||
SETTINGS.close()
|
||||
MAIN.open()
|
||||
else:
|
||||
close()
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
Reference in New Issue
Block a user