From 27d056fafaaa27cb78a6abfb204c3aab6d0a4d8f Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Fri, 12 Jun 2026 22:03:51 -0500 Subject: [PATCH] Slowly fixing small ui bugs --- project.godot | 8 ++++++-- ui/UISingleton.gd | 14 ++++++++++++++ ui/component/ConfirmDialog.gd.uid | 1 + ui/component/ModalBackdrop.gd.uid | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 ui/component/ConfirmDialog.gd.uid create mode 100644 ui/component/ModalBackdrop.gd.uid diff --git a/project.godot b/project.godot index 2707e31..3019bda 100644 --- a/project.godot +++ b/project.godot @@ -69,6 +69,7 @@ ui_accept={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null) ] } @@ -174,21 +175,25 @@ menu={ camera_orbit_left={ "deadzone": 0.15, "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":-1.0,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":74,"key_label":0,"unicode":106,"location":0,"echo":false,"script":null) ] } camera_orbit_right={ "deadzone": 0.15, "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":1.0,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":108,"location":0,"echo":false,"script":null) ] } camera_orbit_up={ "deadzone": 0.15, "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":73,"key_label":0,"unicode":105,"location":0,"echo":false,"script":null) ] } camera_orbit_down={ "deadzone": 0.15, "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":75,"key_label":0,"unicode":107,"location":0,"echo":false,"script":null) ] } tab_prev={ @@ -199,8 +204,7 @@ tab_prev={ } tab_next={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) -, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":false,"script":null) +"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":false,"script":null) ] } center_camera={ diff --git a/ui/UISingleton.gd b/ui/UISingleton.gd index 27efea4..b460006 100644 --- a/ui/UISingleton.gd +++ b/ui/UISingleton.gd @@ -13,6 +13,7 @@ var activeConversation:bool = false func _ready() -> void: DialogueManager.dialogue_started.connect(_onDialogueStarted) DialogueManager.dialogue_ended.connect(_onDialogueEnded) + SCENE.sceneChanged.connect(_onSceneChanged) func _onDialogueStarted(_resource:DialogueResource) -> void: dialogueActive = true @@ -20,6 +21,19 @@ func _onDialogueStarted(_resource:DialogueResource) -> void: func _onDialogueEnded(_resource:DialogueResource) -> void: dialogueActive = false +func _onSceneChanged(_newScene:SceneSingleton.SceneType) -> void: + _cleanupDialogue() + +func _cleanupDialogue() -> void: + if chatBoxContainer: + for child in chatBoxContainer.get_children(): + if child is DialogueTextbox or child is DialogueChoiceBox: + child.queue_free() + activeConversation = false + dialogueActive = false + if INTERACT_INDICATOR: + INTERACT_INDICATOR.clear() + var INTERACT_INDICATOR:InteractIndicator: get(): return interactIndicator diff --git a/ui/component/ConfirmDialog.gd.uid b/ui/component/ConfirmDialog.gd.uid new file mode 100644 index 0000000..d3ca072 --- /dev/null +++ b/ui/component/ConfirmDialog.gd.uid @@ -0,0 +1 @@ +uid://cee1d1wrf0ypc diff --git a/ui/component/ModalBackdrop.gd.uid b/ui/component/ModalBackdrop.gd.uid new file mode 100644 index 0000000..a4adbb7 --- /dev/null +++ b/ui/component/ModalBackdrop.gd.uid @@ -0,0 +1 @@ +uid://bmcklt3xo3hk1