Implement save overwrite confirmation (#368)

* Implement save overwrite confirmation + fixed pause game not pausing game execution.

* docs: Automatic update of API docs

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
Julian Murgia
2021-08-13 09:28:38 +02:00
committed by GitHub
parent 712083d126
commit fc3ea147a7
24 changed files with 442 additions and 102 deletions

View File

@@ -18,7 +18,6 @@ enum {
# The current input mode
var input_mode = INPUT_ALL
# A LIFO stack of hovered items
var hover_stack: Array = []
@@ -26,6 +25,15 @@ var hover_stack: Array = []
var hotspot_focused: String = ""
# Register core signals (from escoria.gd)
func register_core():
escoria.connect(
"request_pause_menu",
self,
"_on_pause_menu_requested"
)
# Connect the item signals to the local methods
func register_inventory_item(item: Node):
item.connect(
@@ -86,24 +94,6 @@ func register_background(background: ESCBackground):
)
# Input event handler
#
# #### Parameters
#
# - event: Godot input event received
func _input(event: InputEvent) -> void:
if event.is_action_pressed("esc_show_debug_prompt"):
escoria.main.get_node("layers/debug_layer/esc_prompt_popup").popup()
if input_mode == INPUT_ALL and event.is_action_pressed("ui_cancel"):
_on_pause_menu_requested()
if ProjectSettings.get_setting("escoria/ui/tooltip_follows_mouse"):
if escoria.main.current_scene and escoria.main.current_scene.game:
if event is InputEventMouseMotion:
escoria.main.current_scene.game.update_tooltip_following_mouse_position(event.position)
# The background was clicked with the LMB
#
# #### Parameters