|
@@ -1,15 +1,22 @@
|
|
|
extends VSplitContainer
|
|
|
|
|
|
|
|
|
+func resume() -> void:
|
|
|
+ hide()
|
|
|
+ get_tree().set_pause(false)
|
|
|
+
|
|
|
+
|
|
|
func _unhandled_input(event: InputEvent) -> void:
|
|
|
- if event.is_action_released("ui_pause") and not get_tree().is_paused():
|
|
|
- get_tree().set_pause(true)
|
|
|
- show()
|
|
|
+ if event.is_action_released("ui_pause"):
|
|
|
+ if get_tree().is_paused():
|
|
|
+ resume()
|
|
|
+ else:
|
|
|
+ get_tree().set_pause(true)
|
|
|
+ show()
|
|
|
|
|
|
|
|
|
func _on_resume_button_pressed():
|
|
|
- hide()
|
|
|
- get_tree().set_pause(false)
|
|
|
+ resume()
|
|
|
|
|
|
|
|
|
func _on_title_button_pressed():
|