2024-12-23 01:29:31 +00:00
|
|
|
extends Node2D
|
|
|
|
|
2025-06-27 18:41:37 +00:00
|
|
|
# @export var locale := "":
|
|
|
|
# set(val):
|
|
|
|
# TranslationServer.set_locale(val)
|
|
|
|
# locale = val
|
2024-12-24 01:16:06 +00:00
|
|
|
|
2025-01-08 00:51:09 +00:00
|
|
|
|
2024-12-23 01:29:31 +00:00
|
|
|
func _ready() -> void:
|
2025-01-16 12:24:21 +00:00
|
|
|
%UILayer.layer = GlobalConfig.CANVAS_LAYER_UI
|
2025-01-06 08:06:20 +00:00
|
|
|
%ColorRectTop.visible = true
|
|
|
|
%ColorRectBottom.visible = true
|
2025-01-16 12:24:21 +00:00
|
|
|
# focus_mode = Control.FOCUS_CLICK
|
|
|
|
# settings.exited.connect(grab_focus)
|
|
|
|
|
|
|
|
|
|
|
|
func _unhandled_input(event: InputEvent) -> void:
|
|
|
|
if event.is_action_pressed("escape"):
|
|
|
|
get_viewport().set_input_as_handled()
|
2025-06-27 14:52:46 +00:00
|
|
|
SceneManager.show_panel()
|
|
|
|
# SceneManager.show_settings()
|
2025-01-16 12:24:21 +00:00
|
|
|
elif event.is_action_pressed("bag"):
|
2025-06-27 14:52:46 +00:00
|
|
|
get_viewport().set_input_as_handled()
|
2025-01-16 12:24:21 +00:00
|
|
|
SceneManager.show_bag()
|
2025-06-27 14:52:46 +00:00
|
|
|
elif event.is_action_pressed("memory"):
|
|
|
|
get_viewport().set_input_as_handled()
|
|
|
|
SceneManager.show_memory()
|
|
|
|
elif event.is_action_pressed("note"):
|
2025-01-16 12:24:21 +00:00
|
|
|
get_viewport().set_input_as_handled()
|
2025-06-27 14:52:46 +00:00
|
|
|
SceneManager.show_note()
|
|
|
|
elif event.is_action_pressed("panel"):
|
2025-06-23 15:07:00 +00:00
|
|
|
get_viewport().set_input_as_handled()
|
2025-06-27 14:52:46 +00:00
|
|
|
SceneManager.show_panel()
|