From a0fa0ecef497645aeb5c2a7ea15dd93c7785e7bc Mon Sep 17 00:00:00 2001 From: Sarita <144745536+Mipuim@users.noreply.github.com> Date: Thu, 3 Sep 2026 18:46:48 -0500 Subject: [PATCH 1/5] feat: Design collectible health items #1744 --- .../collectible_item/collectible_item.tscn | 2 +- .../props/health/health_item_anim.png | 3 ++ .../props/health/health_item_anim.png.import | 40 +++++++++++++++++++ .../props/health/health_item_anim.tres | 3 ++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 scenes/game_elements/props/health/health_item_anim.png create mode 100644 scenes/game_elements/props/health/health_item_anim.png.import create mode 100644 scenes/game_elements/props/health/health_item_anim.tres diff --git a/scenes/game_elements/props/collectible_item/collectible_item.tscn b/scenes/game_elements/props/collectible_item/collectible_item.tscn index 815230f0e2..4581dcd741 100644 --- a/scenes/game_elements/props/collectible_item/collectible_item.tscn +++ b/scenes/game_elements/props/collectible_item/collectible_item.tscn @@ -311,7 +311,7 @@ metadata/_custom_type_script = "uid://du8wfijr35r35" [node name="CollisionShape2D" type="CollisionShape2D" parent="InteractArea" unique_id=1121983883] shape = SubResource("CircleShape2D_ghwae") -debug_color = Color(0.600391, 0.54335, 0, 0.42) +debug_color = Color(0.6, 0.545, 0, 0.42) [node name="Marker" type="Marker2D" parent="InteractArea" unique_id=1961850851] position = Vector2(0, -48) diff --git a/scenes/game_elements/props/health/health_item_anim.png b/scenes/game_elements/props/health/health_item_anim.png new file mode 100644 index 0000000000..5ebbcdfc4a --- /dev/null +++ b/scenes/game_elements/props/health/health_item_anim.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2d2b1a658714788644af1f2141e8fd744c6bdf4b4926f97afee0331759c6b8a +size 17796 diff --git a/scenes/game_elements/props/health/health_item_anim.png.import b/scenes/game_elements/props/health/health_item_anim.png.import new file mode 100644 index 0000000000..ee439e28b5 --- /dev/null +++ b/scenes/game_elements/props/health/health_item_anim.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dqsui8bgfvftj" +path="res://.godot/imported/health_item_anim.png-e91e9af03bc3d7c1fe1f1a99eb165534.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/game_elements/props/health/health_item_anim.png" +dest_files=["res://.godot/imported/health_item_anim.png-e91e9af03bc3d7c1fe1f1a99eb165534.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/scenes/game_elements/props/health/health_item_anim.tres b/scenes/game_elements/props/health/health_item_anim.tres new file mode 100644 index 0000000000..43186c7bee --- /dev/null +++ b/scenes/game_elements/props/health/health_item_anim.tres @@ -0,0 +1,3 @@ +[gd_resource type="SpriteFrames" format=3 uid="uid://gwna17dbgeg5"] + +[resource] From 50063ab67735e6948003f359d606a576ed707848 Mon Sep 17 00:00:00 2001 From: Sarita <144745536+Mipuim@users.noreply.github.com> Date: Mon, 7 Sep 2026 22:01:43 -0500 Subject: [PATCH 2/5] refactor: I adjusted the design to make it more consistent with the rest and fixed the shadow so it has transparency. --- .../props/health/health_item_anim.png | 3 - .../props/health/health_item_anim.tres | 3 - .../health_item/components/health_item.png | 3 + .../components/health_item.png.import} | 8 +- .../health_item/components/health_item.tres | 88 +++++++++++++++++++ 5 files changed, 95 insertions(+), 10 deletions(-) delete mode 100644 scenes/game_elements/props/health/health_item_anim.png delete mode 100644 scenes/game_elements/props/health/health_item_anim.tres create mode 100644 scenes/game_elements/props/health_item/components/health_item.png rename scenes/game_elements/props/{health/health_item_anim.png.import => health_item/components/health_item.png.import} (71%) create mode 100644 scenes/game_elements/props/health_item/components/health_item.tres diff --git a/scenes/game_elements/props/health/health_item_anim.png b/scenes/game_elements/props/health/health_item_anim.png deleted file mode 100644 index 5ebbcdfc4a..0000000000 --- a/scenes/game_elements/props/health/health_item_anim.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2d2b1a658714788644af1f2141e8fd744c6bdf4b4926f97afee0331759c6b8a -size 17796 diff --git a/scenes/game_elements/props/health/health_item_anim.tres b/scenes/game_elements/props/health/health_item_anim.tres deleted file mode 100644 index 43186c7bee..0000000000 --- a/scenes/game_elements/props/health/health_item_anim.tres +++ /dev/null @@ -1,3 +0,0 @@ -[gd_resource type="SpriteFrames" format=3 uid="uid://gwna17dbgeg5"] - -[resource] diff --git a/scenes/game_elements/props/health_item/components/health_item.png b/scenes/game_elements/props/health_item/components/health_item.png new file mode 100644 index 0000000000..a242596e03 --- /dev/null +++ b/scenes/game_elements/props/health_item/components/health_item.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c9c047b768de47b81ecc697a570d37edf2e3b7d1181ccd514626248d470de01 +size 15903 diff --git a/scenes/game_elements/props/health/health_item_anim.png.import b/scenes/game_elements/props/health_item/components/health_item.png.import similarity index 71% rename from scenes/game_elements/props/health/health_item_anim.png.import rename to scenes/game_elements/props/health_item/components/health_item.png.import index ee439e28b5..250c63ca17 100644 --- a/scenes/game_elements/props/health/health_item_anim.png.import +++ b/scenes/game_elements/props/health_item/components/health_item.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dqsui8bgfvftj" -path="res://.godot/imported/health_item_anim.png-e91e9af03bc3d7c1fe1f1a99eb165534.ctex" +uid="uid://exhjssmvkllv" +path="res://.godot/imported/health_item.png-ffcb4d6c1ce83d09f66b82c207b78406.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://scenes/game_elements/props/health/health_item_anim.png" -dest_files=["res://.godot/imported/health_item_anim.png-e91e9af03bc3d7c1fe1f1a99eb165534.ctex"] +source_file="res://scenes/game_elements/props/health_item/components/health_item.png" +dest_files=["res://.godot/imported/health_item.png-ffcb4d6c1ce83d09f66b82c207b78406.ctex"] [params] diff --git a/scenes/game_elements/props/health_item/components/health_item.tres b/scenes/game_elements/props/health_item/components/health_item.tres new file mode 100644 index 0000000000..7f3cabf3fa --- /dev/null +++ b/scenes/game_elements/props/health_item/components/health_item.tres @@ -0,0 +1,88 @@ +[gd_resource type="SpriteFrames" format=3 uid="uid://uperrddaw5ok"] + +[ext_resource type="Texture2D" uid="uid://exhjssmvkllv" path="res://scenes/game_elements/props/health_item/components/health_item.png" id="1_qtkly"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_as7yo"] +atlas = ExtResource("1_qtkly") +region = Rect2(64, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fremn"] +atlas = ExtResource("1_qtkly") +region = Rect2(128, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0su3u"] +atlas = ExtResource("1_qtkly") +region = Rect2(0, 64, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xcv83"] +atlas = ExtResource("1_qtkly") +region = Rect2(64, 64, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8um1a"] +atlas = ExtResource("1_qtkly") +region = Rect2(128, 64, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_eob1k"] +atlas = ExtResource("1_qtkly") +region = Rect2(0, 128, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_84oik"] +atlas = ExtResource("1_qtkly") +region = Rect2(64, 128, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7cpmn"] +atlas = ExtResource("1_qtkly") +region = Rect2(128, 128, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gvmf1"] +atlas = ExtResource("1_qtkly") +region = Rect2(0, 192, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rq52m"] +atlas = ExtResource("1_qtkly") +region = Rect2(64, 192, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dy20p"] +atlas = ExtResource("1_qtkly") +region = Rect2(0, 0, 64, 64) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_as7yo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fremn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0su3u") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xcv83") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8um1a") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_eob1k") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_84oik") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7cpmn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gvmf1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rq52m") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_dy20p") +}], +"loop": 0, +"name": &"default", +"speed": 5.0 +}] From b5b5f8db07f6e7b4107f8a46d008db86ae41d207 Mon Sep 17 00:00:00 2001 From: Sarita <144745536+Mipuim@users.noreply.github.com> Date: Tue, 8 Sep 2026 17:53:49 -0500 Subject: [PATCH 3/5] refactor: I corrected the shadow --- .../health_item/components/health_item.png | 4 +- .../components/health_item.png.import | 2 +- .../health_item/components/health_item.tres | 87 +------------------ 3 files changed, 4 insertions(+), 89 deletions(-) diff --git a/scenes/game_elements/props/health_item/components/health_item.png b/scenes/game_elements/props/health_item/components/health_item.png index a242596e03..0f11215716 100644 --- a/scenes/game_elements/props/health_item/components/health_item.png +++ b/scenes/game_elements/props/health_item/components/health_item.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c9c047b768de47b81ecc697a570d37edf2e3b7d1181ccd514626248d470de01 -size 15903 +oid sha256:c3f92a4ace61c9d55ed6336311c32d57f6c32855a3e75f820a9d655fbbbcc253 +size 15951 diff --git a/scenes/game_elements/props/health_item/components/health_item.png.import b/scenes/game_elements/props/health_item/components/health_item.png.import index 250c63ca17..374d3b3f1d 100644 --- a/scenes/game_elements/props/health_item/components/health_item.png.import +++ b/scenes/game_elements/props/health_item/components/health_item.png.import @@ -2,7 +2,7 @@ importer="texture" type="CompressedTexture2D" -uid="uid://exhjssmvkllv" +uid="uid://b8mjjvpetr2sx" path="res://.godot/imported/health_item.png-ffcb4d6c1ce83d09f66b82c207b78406.ctex" metadata={ "vram_texture": false diff --git a/scenes/game_elements/props/health_item/components/health_item.tres b/scenes/game_elements/props/health_item/components/health_item.tres index 7f3cabf3fa..2f2e0c253a 100644 --- a/scenes/game_elements/props/health_item/components/health_item.tres +++ b/scenes/game_elements/props/health_item/components/health_item.tres @@ -1,88 +1,3 @@ -[gd_resource type="SpriteFrames" format=3 uid="uid://uperrddaw5ok"] - -[ext_resource type="Texture2D" uid="uid://exhjssmvkllv" path="res://scenes/game_elements/props/health_item/components/health_item.png" id="1_qtkly"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_as7yo"] -atlas = ExtResource("1_qtkly") -region = Rect2(64, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_fremn"] -atlas = ExtResource("1_qtkly") -region = Rect2(128, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0su3u"] -atlas = ExtResource("1_qtkly") -region = Rect2(0, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_xcv83"] -atlas = ExtResource("1_qtkly") -region = Rect2(64, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8um1a"] -atlas = ExtResource("1_qtkly") -region = Rect2(128, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_eob1k"] -atlas = ExtResource("1_qtkly") -region = Rect2(0, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_84oik"] -atlas = ExtResource("1_qtkly") -region = Rect2(64, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_7cpmn"] -atlas = ExtResource("1_qtkly") -region = Rect2(128, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_gvmf1"] -atlas = ExtResource("1_qtkly") -region = Rect2(0, 192, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_rq52m"] -atlas = ExtResource("1_qtkly") -region = Rect2(64, 192, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_dy20p"] -atlas = ExtResource("1_qtkly") -region = Rect2(0, 0, 64, 64) +[gd_resource type="SpriteFrames" format=3 uid="uid://xuw3tderjceg"] [resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_as7yo") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_fremn") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0su3u") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_xcv83") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_8um1a") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_eob1k") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_84oik") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_7cpmn") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_gvmf1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_rq52m") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_dy20p") -}], -"loop": 0, -"name": &"default", -"speed": 5.0 -}] From 7fee4db9c842a6c4c3e16bd48c9633806a53b1ec Mon Sep 17 00:00:00 2001 From: Sarita <144745536+Mipuim@users.noreply.github.com> Date: Tue, 8 Sep 2026 18:03:32 -0500 Subject: [PATCH 4/5] refactor: add the SpriteFrames --- .../health_item/components/health_item.tres | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/scenes/game_elements/props/health_item/components/health_item.tres b/scenes/game_elements/props/health_item/components/health_item.tres index 2f2e0c253a..e7ebd873d7 100644 --- a/scenes/game_elements/props/health_item/components/health_item.tres +++ b/scenes/game_elements/props/health_item/components/health_item.tres @@ -1,3 +1,88 @@ [gd_resource type="SpriteFrames" format=3 uid="uid://xuw3tderjceg"] +[ext_resource type="Texture2D" uid="uid://b8mjjvpetr2sx" path="res://scenes/game_elements/props/health_item/components/health_item.png" id="1_qtkly"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_as7yo"] +atlas = ExtResource("1_qtkly") +region = Rect2(0, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fremn"] +atlas = ExtResource("1_qtkly") +region = Rect2(64, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0su3u"] +atlas = ExtResource("1_qtkly") +region = Rect2(128, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xcv83"] +atlas = ExtResource("1_qtkly") +region = Rect2(0, 64, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8um1a"] +atlas = ExtResource("1_qtkly") +region = Rect2(64, 64, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_eob1k"] +atlas = ExtResource("1_qtkly") +region = Rect2(128, 64, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_84oik"] +atlas = ExtResource("1_qtkly") +region = Rect2(0, 128, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7cpmn"] +atlas = ExtResource("1_qtkly") +region = Rect2(64, 128, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gvmf1"] +atlas = ExtResource("1_qtkly") +region = Rect2(128, 128, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rq52m"] +atlas = ExtResource("1_qtkly") +region = Rect2(0, 192, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dy20p"] +atlas = ExtResource("1_qtkly") +region = Rect2(64, 192, 64, 64) + [resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_as7yo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fremn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0su3u") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xcv83") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8um1a") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_eob1k") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_84oik") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7cpmn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gvmf1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rq52m") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_dy20p") +}], +"loop": 1, +"name": &"default", +"speed": 10.0 +}] From bf7201f113a636bda9dbbdc3cad8868b0210e3b7 Mon Sep 17 00:00:00 2001 From: Sarita <144745536+Mipuim@users.noreply.github.com> Date: Sun, 20 Sep 2026 19:16:58 -0500 Subject: [PATCH 5/5] fix: hide mouse pointer by default and handle dynamic visibility --- scenes/globals/mouse_manager/mouse_manager.gd | 50 +++++++++++++++++-- .../globals/mouse_manager/mouse_manager.tscn | 1 - scenes/globals/pause/pause_overlay.gd | 4 ++ scenes/menus/title/components/title_screen.gd | 10 ++++ 4 files changed, 61 insertions(+), 4 deletions(-) diff --git a/scenes/globals/mouse_manager/mouse_manager.gd b/scenes/globals/mouse_manager/mouse_manager.gd index dc37b2e319..5293636028 100644 --- a/scenes/globals/mouse_manager/mouse_manager.gd +++ b/scenes/globals/mouse_manager/mouse_manager.gd @@ -7,6 +7,9 @@ signal mode_changed const MOUSE_CURSOR_DEFAULT = preload("uid://cee2juvnxco6c") const MOUSE_CURSOR_CROSS = preload("uid://bx11wyx7unc4q") +## Conteo de referencias para controlar cuándo está permitida la interacción con ratón. +var _holds: int = 0 + @onready var hide_timer: Timer = %HideTimer @@ -15,25 +18,66 @@ func _ready() -> void: Input.set_custom_mouse_cursor(MOUSE_CURSOR_CROSS, Input.CURSOR_CROSS, Vector2(32, 32)) Input.set_default_cursor_shape(Input.CURSOR_CROSS) + # El cursor comienza oculto hasta que un sistema solicite un hold y se mueva el ratón. + Input.mouse_mode = Input.MOUSE_MODE_HIDDEN + DialogueManager.dialogue_started.connect(_on_dialogue_started) DialogueManager.dialogue_ended.connect(_on_dialogue_ended) +## Registra una solicitud para habilitar la interacción con el ratón. +func hold() -> void: + _holds += 1 + + +## Libera una solicitud previa de interacción con el ratón. +func release() -> void: + _holds = maxi(0, _holds - 1) + if _holds == 0: + _hide_mouse() + + func _input(event: InputEvent) -> void: if event is InputEventMouseMotion: + if _holds > 0: + _show_mouse() + elif _is_keyboard_or_controller_event(event): + _hide_mouse() + + +func _is_keyboard_or_controller_event(event: InputEvent) -> bool: + if event is InputEventKey and event.is_pressed(): + return true + if event is InputEventJoypadButton and event.is_pressed(): + return true + if event is InputEventJoypadMotion and absf(event.axis_value) > 0.5: + return true + return false + + +func _show_mouse() -> void: + if Input.mouse_mode != Input.MOUSE_MODE_VISIBLE: Input.mouse_mode = Input.MOUSE_MODE_VISIBLE mode_changed.emit() - hide_timer.start() + hide_timer.start() + + +func _hide_mouse() -> void: + hide_timer.stop() + if Input.mouse_mode != Input.MOUSE_MODE_HIDDEN: + Input.mouse_mode = Input.MOUSE_MODE_HIDDEN + mode_changed.emit() func _on_hide_timer_timeout() -> void: - Input.mouse_mode = Input.MOUSE_MODE_HIDDEN - mode_changed.emit() + _hide_mouse() func _on_dialogue_started(_resource: DialogueResource) -> void: Input.set_default_cursor_shape(Input.CURSOR_ARROW) + hold() func _on_dialogue_ended(_resource: DialogueResource) -> void: Input.set_default_cursor_shape(Input.CURSOR_CROSS) + release() diff --git a/scenes/globals/mouse_manager/mouse_manager.tscn b/scenes/globals/mouse_manager/mouse_manager.tscn index 457ffc5ef2..5b7ed5cc76 100644 --- a/scenes/globals/mouse_manager/mouse_manager.tscn +++ b/scenes/globals/mouse_manager/mouse_manager.tscn @@ -11,6 +11,5 @@ script = ExtResource("1_u8i10") unique_name_in_owner = true wait_time = 3.0 one_shot = true -autostart = true [connection signal="timeout" from="HideTimer" to="." method="_on_hide_timer_timeout"] diff --git a/scenes/globals/pause/pause_overlay.gd b/scenes/globals/pause/pause_overlay.gd index ac67f74dbc..96c0222cd7 100644 --- a/scenes/globals/pause/pause_overlay.gd +++ b/scenes/globals/pause/pause_overlay.gd @@ -34,6 +34,10 @@ func toggle_pause() -> void: get_tree().paused = new_state Input.set_default_cursor_shape(Input.CURSOR_ARROW if new_state else Input.CURSOR_CROSS) + if new_state: + MouseManager.hold() + else: + MouseManager.release() if new_state: if not GameState.quest: diff --git a/scenes/menus/title/components/title_screen.gd b/scenes/menus/title/components/title_screen.gd index 7dfe7e4fc0..7425b2d499 100644 --- a/scenes/menus/title/components/title_screen.gd +++ b/scenes/menus/title/components/title_screen.gd @@ -9,6 +9,16 @@ var opening_quest: Quest @onready var credits: Control = %Credits +func _enter_tree() -> void: + MouseManager.hold() + Input.set_default_cursor_shape(Input.CURSOR_ARROW) + + +func _exit_tree() -> void: + MouseManager.release() + Input.set_default_cursor_shape(Input.CURSOR_CROSS) + + func _ready() -> void: opening_quest = load( ThreadbareProjectSettings.get_setting(ThreadbareProjectSettings.OPENING_QUEST)