#222 focus handling to demo scene
This commit is contained in:
parent
449716acd1
commit
0a87cc4205
|
|
@ -128,15 +128,21 @@ func show_accessibility_settings():
|
||||||
%Accessibility.is_active = true
|
%Accessibility.is_active = true
|
||||||
await %Accessibility.leave_stage
|
await %Accessibility.leave_stage
|
||||||
%AccessibilityContainer.hide()
|
%AccessibilityContainer.hide()
|
||||||
|
if in_game:
|
||||||
|
%ResumeButton.grab_focus()
|
||||||
|
else:
|
||||||
|
$Menu/VBoxContainer2/PressStart.grab_focus()
|
||||||
|
|
||||||
func toggle_pause_menu():
|
func toggle_pause_menu():
|
||||||
if not get_tree().paused:
|
if not get_tree().paused:
|
||||||
get_tree().paused = true
|
get_tree().paused = true
|
||||||
%PauseContainer.show()
|
%PauseContainer.show()
|
||||||
|
%ResumeButton.grab_focus()
|
||||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||||
else:
|
else:
|
||||||
get_tree().paused = false
|
get_tree().paused = false
|
||||||
%PauseContainer.hide()
|
%PauseContainer.hide()
|
||||||
|
%ResumeButton.grab_focus()
|
||||||
|
|
||||||
if State.stage_list[0] is Player:
|
if State.stage_list[0] is Player:
|
||||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue