fix: can now leave canvas (still bug needs double ESC)

This commit is contained in:
tiger tiger tiger 2026-01-22 19:42:28 +01:00
parent 92879b6bbf
commit c0f3bd40a9
5 changed files with 9 additions and 7 deletions

View File

@ -390,8 +390,9 @@ func handle_drop(draggable: Draggable) -> int:
# Takes the inputs for control inputs
func _gui_input(event : InputEvent) -> void:
func _input(event : InputEvent) -> void:
if event.is_action_pressed("ui_cancel"):
print("ui_cancel")
closed.emit()
get_viewport().set_input_as_handled()

View File

@ -70,7 +70,7 @@ var tween : Tween = null
func animate_home() -> void:
z_index = 50
z_index = 100
if tween: tween.kill()
tween = create_tween().set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_QUART)
tween.tween_property(self, "position", home, 0.5)

View File

@ -5,12 +5,12 @@
[ext_resource type="PackedScene" uid="uid://uc6urpgv7n1y" path="res://logic-scenes/card_burner/cursor_candle.tscn" id="3_l4ogr"]
[ext_resource type="Script" uid="uid://bbs1u7ojno7xo" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="4_x6cxt"]
[sub_resource type="InputEventKey" id="InputEventKey_ckmi5"]
[sub_resource type="InputEventKey" id="InputEventKey_j3x3g"]
device = -1
physical_keycode = 88
unicode = 120
[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_x6cxt"]
[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_ckmi5"]
device = -1
button_index = 2
pressed = true
@ -156,7 +156,7 @@ stretch_mode = 5
script = ExtResource("4_x6cxt")
action = "skip"
icon = 0
events = Array[InputEvent]([null, SubResource("InputEventKey_ckmi5"), SubResource("InputEventJoypadButton_x6cxt")])
events = Array[InputEvent]([null, SubResource("InputEventKey_j3x3g"), SubResource("InputEventJoypadButton_ckmi5")])
metadata/_custom_type_script = "uid://bbs1u7ojno7xo"
[node name="SkipButton" type="Button" parent="Control/HSplitContainer"]

View File

@ -185,12 +185,13 @@ func play():
func _unhandled_input(event: InputEvent) -> void:
if not visible: return
if event.is_action_pressed("ui_text_scroll_down"):
accept_event()
scroll_target += 40
all_text_revealed = animation_complete
if event.is_action_released("ui_text_scroll_up"):
if event.is_action_pressed("ui_text_scroll_up"):
accept_event()
scroll_target -= 40
all_text_revealed = all_text_revealed or animation_complete

View File

@ -106,8 +106,8 @@ ui_text_scroll_down={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"command_or_control_autoremap":true,"alt_pressed":false,"shift_pressed":false,"pressed":false,"keycode":4194322,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null)
, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":16,"position":Vector2(246, 6),"global_position":Vector2(255, 54),"factor":1.0,"button_index":5,"canceled":false,"pressed":true,"double_click":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":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":16,"position":Vector2(246, 6),"global_position":Vector2(255, 54),"factor":1.0,"button_index":5,"canceled":false,"pressed":true,"double_click":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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":12,"pressure":0.0,"pressed":true,"script":null)
]