feat: started working on prompter class. feat: curtain now hides itself entirely in debug boot. change: skip action is now called scene_skip

This commit is contained in:
tiger tiger tiger 2026-01-23 11:30:42 +01:00
parent 14453c12b9
commit 1d9a264324
6 changed files with 77 additions and 9 deletions

View File

@ -16,7 +16,7 @@ button_index = 2
pressed = true pressed = true
[sub_resource type="InputEventAction" id="InputEventAction_23lqb"] [sub_resource type="InputEventAction" id="InputEventAction_23lqb"]
action = &"skip" action = &"scene_skip"
[sub_resource type="Shortcut" id="Shortcut_57mhv"] [sub_resource type="Shortcut" id="Shortcut_57mhv"]
events = [SubResource("InputEventAction_23lqb")] events = [SubResource("InputEventAction_23lqb")]
@ -154,7 +154,7 @@ texture = ExtResource("3_ckmi5")
expand_mode = 2 expand_mode = 2
stretch_mode = 5 stretch_mode = 5
script = ExtResource("4_x6cxt") script = ExtResource("4_x6cxt")
action = "skip" action = "scene_skip"
icon = 0 icon = 0
events = Array[InputEvent]([null, SubResource("InputEventKey_j3x3g"), SubResource("InputEventJoypadButton_ckmi5")]) events = Array[InputEvent]([null, SubResource("InputEventKey_j3x3g"), SubResource("InputEventJoypadButton_ckmi5")])
metadata/_custom_type_script = "uid://bbs1u7ojno7xo" metadata/_custom_type_script = "uid://bbs1u7ojno7xo"

View File

@ -173,7 +173,7 @@ look_down={
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null) "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
] ]
} }
skip={ scene_skip={
"deadzone": 0.5, "deadzone": 0.5,
"events": [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":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null) "events": [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":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null)

View File

@ -6,6 +6,10 @@ var _tween : Tween = null
func _ready() -> void: func _ready() -> void:
print("curtain.gd: ready()") print("curtain.gd: ready()")
visible = true visible = true
_check_boot.call_deferred()
func _check_boot():
self.visible = Main.normal_boot
## Conceals the Game Stage ## Conceals the Game Stage
func close() -> void: func close() -> void:

View File

@ -0,0 +1,64 @@
[gd_scene load_steps=5 format=3 uid="uid://btmlxxbucfqa7"]
[ext_resource type="Texture2D" uid="uid://615hvpuiacvm" path="res://addons/input_prompts/icons/xbox/X.png" id="1_uowr1"]
[ext_resource type="Script" uid="uid://bbs1u7ojno7xo" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="2_xtx06"]
[sub_resource type="InputEventKey" id="InputEventKey_uowr1"]
device = -1
physical_keycode = 88
unicode = 120
[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_xtx06"]
device = -1
button_index = 2
pressed = true
[node name="Prompter" type="MarginContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 42
theme_override_constants/margin_top = 42
theme_override_constants/margin_right = 42
theme_override_constants/margin_bottom = 42
[node name="CenterContainer" type="CenterContainer" parent="."]
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer"]
custom_minimum_size = Vector2(500, 500)
layout_mode = 2
[node name="VPrompt" type="VBoxContainer" parent="CenterContainer/MarginContainer"]
custom_minimum_size = Vector2(480, 80)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
[node name="CenterContainer" type="CenterContainer" parent="CenterContainer/MarginContainer/VPrompt"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
[node name="ActionPrompt" type="TextureRect" parent="CenterContainer/MarginContainer/VPrompt/CenterContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(48, 48)
layout_mode = 2
size_flags_vertical = 3
texture = ExtResource("1_uowr1")
stretch_mode = 5
script = ExtResource("2_xtx06")
action = "scene_skip"
icon = 0
events = Array[InputEvent]([null, SubResource("InputEventKey_uowr1"), SubResource("InputEventJoypadButton_xtx06")])
[node name="SkipButton" type="Button" parent="CenterContainer/MarginContainer/VPrompt"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
text = "reveal full text (hold)"
[connection signal="button_down" from="CenterContainer/MarginContainer/VPrompt/SkipButton" to="CenterContainer/MarginContainer/VPrompt" method="_on_skip_button_button_down"]
[connection signal="button_up" from="CenterContainer/MarginContainer/VPrompt/SkipButton" to="CenterContainer/MarginContainer/VPrompt" method="_on_skip_button_button_up"]
[connection signal="toggled" from="CenterContainer/MarginContainer/VPrompt/SkipButton" to="CenterContainer/MarginContainer/VPrompt" method="_on_skip_button_toggled"]

View File

@ -28,7 +28,7 @@ var text_revealed: bool = false:
button.text = "skip scene" button.text = "skip scene"
elif is_node_ready(): elif is_node_ready():
button.text = "reveal full text (hold)" button.text = "reveal full text (hold)"
action_prompt.action = "skip" action_prompt.action = "scene_skip"
text_revealed = value text_revealed = value
## while this is true, a counter counts up to automatically proceed. ## while this is true, a counter counts up to automatically proceed.
var aborted var aborted
@ -44,7 +44,7 @@ var is_auto_proceeding: bool = false:
# use this to disable the updates during progress. # use this to disable the updates during progress.
is_auto_proceeding = false is_auto_proceeding = false
await _transition_text await _transition_text
action_prompt.action = "skip" action_prompt.action = "scene_skip"
button.text = "continue" button.text = "continue"
elif not is_auto_proceeding and value: elif not is_auto_proceeding and value:
$AnimationPlayer.play("replace_text") $AnimationPlayer.play("replace_text")
@ -85,7 +85,7 @@ func _input(event: InputEvent) -> void:
$AnimationPlayer.play("reveal_skip") $AnimationPlayer.play("reveal_skip")
unrevealed = false unrevealed = false
if event.is_action_pressed("skip"): if event.is_action_pressed("scene_skip"):
if not (is_auto_proceeding or aborted): if not (is_auto_proceeding or aborted):
pressed = true pressed = true
else: else:
@ -96,13 +96,13 @@ func _input(event: InputEvent) -> void:
reset() reset()
get_viewport().set_input_as_handled() get_viewport().set_input_as_handled()
elif event.is_action_released("skip"): elif event.is_action_released("scene_skip"):
if not is_auto_proceeding: if not is_auto_proceeding:
pressed = false pressed = false
time_pressed = 0 time_pressed = 0
progress.value = 0 progress.value = 0
get_viewport().set_input_as_handled() get_viewport().set_input_as_handled()
elif Input.is_action_just_pressed("ui_accept") or Input.is_action_just_pressed("ui_focus_next") or Input.is_action_just_pressed("skip") and is_auto_proceeding: elif Input.is_action_just_pressed("ui_accept") or Input.is_action_just_pressed("ui_focus_next") or Input.is_action_just_pressed("scene_skip") and is_auto_proceeding:
proceed.emit() proceed.emit()
get_viewport().set_input_as_handled() get_viewport().set_input_as_handled()
reset() reset()

View File

@ -294,7 +294,7 @@ texture = ExtResource("2_pnwbx")
expand_mode = 2 expand_mode = 2
stretch_mode = 5 stretch_mode = 5
script = ExtResource("2_ev8gx") script = ExtResource("2_ev8gx")
action = "skip" action = "scene_skip"
icon = 0 icon = 0
events = Array[InputEvent]([null, SubResource("InputEventKey_4wxxu"), SubResource("InputEventJoypadButton_qghsb")]) events = Array[InputEvent]([null, SubResource("InputEventKey_4wxxu"), SubResource("InputEventJoypadButton_qghsb")])