save and new and load

This commit is contained in:
Persephone Bubblegum-Holidy 2025-05-25 22:34:19 -07:00
parent 65ac1d73f3
commit 9544a47ee4
7 changed files with 822 additions and 81 deletions

View file

@ -1,9 +1,8 @@
[gd_scene load_steps=28 format=3 uid="uid://oiehbor0dlqx"] [gd_scene load_steps=27 format=3 uid="uid://oiehbor0dlqx"]
[ext_resource type="Script" uid="uid://dfiwoln8mdwm8" path="res://Scripts/EditorScreen.gd" id="1_sd512"] [ext_resource type="Script" uid="uid://dfiwoln8mdwm8" path="res://Scripts/EditorScreen.gd" id="1_sd512"]
[ext_resource type="Theme" uid="uid://dbgs4id7y5d1c" path="res://UI/Themes/Dark.tres" id="1_v0ton"] [ext_resource type="Theme" uid="uid://dbgs4id7y5d1c" path="res://UI/Themes/Dark.tres" id="1_v0ton"]
[ext_resource type="PackedScene" uid="uid://btre5j66mpchy" path="res://Scenes/Stages/Helen House/HelenHouse.tscn" id="2_p1t5g"] [ext_resource type="PackedScene" uid="uid://btre5j66mpchy" path="res://Scenes/Stages/Helen House/HelenHouse.tscn" id="2_p1t5g"]
[ext_resource type="AudioStream" uid="uid://c1hjkaatw2koh" path="res://UI/placeholder_delete_this_file_later_please_its_so_large.wav" id="3_20noo"]
[ext_resource type="Texture2D" uid="uid://xllpr3qc064c" path="res://UI/Play.png" id="3_g6u4d"] [ext_resource type="Texture2D" uid="uid://xllpr3qc064c" path="res://UI/Play.png" id="3_g6u4d"]
[ext_resource type="Texture2D" uid="uid://dgacnkv2dc65s" path="res://UI/PlayBackwards.png" id="3_mr8sb"] [ext_resource type="Texture2D" uid="uid://dgacnkv2dc65s" path="res://UI/PlayBackwards.png" id="3_mr8sb"]
[ext_resource type="Texture2D" uid="uid://dts4eh6hyt8p3" path="res://UI/SkipBackwards.png" id="3_r4ytj"] [ext_resource type="Texture2D" uid="uid://dts4eh6hyt8p3" path="res://UI/SkipBackwards.png" id="3_r4ytj"]
@ -51,8 +50,67 @@ grow_vertical = 2
theme = ExtResource("1_v0ton") theme = ExtResource("1_v0ton")
script = ExtResource("1_sd512") script = ExtResource("1_sd512")
[node name="OpenAudioFileDialog" type="FileDialog" parent="."]
title = "Open a File"
initial_position = 2
ok_button_text = "Open"
dialog_hide_on_ok = true
file_mode = 0
access = 2
filters = PackedStringArray("*.wav", "*.mp3", "*.ogg")
[node name="OpenShowtapeFileDialog" type="FileDialog" parent="."]
auto_translate_mode = 1
title = "Open a File"
initial_position = 2
ok_button_text = "Open"
dialog_hide_on_ok = true
file_mode = 0
access = 2
filters = PackedStringArray("*.ust")
[node name="SaveShowtapeFileDialog" type="FileDialog" parent="."]
auto_translate_mode = 1
initial_position = 2
dialog_hide_on_ok = true
access = 2
filters = PackedStringArray("*.ust")
[node name="NewOverwriteConfirmationDialog" type="ConfirmationDialog" parent="."]
initial_position = 2
size = Vector2i(472, 100)
ok_button_text = "Proceed"
dialog_text = "You have unsaved data! Are you sure you want to proceed?"
cancel_button_text = "Do Not"
[node name="LoadOverwriteConfirmationDialog" type="ConfirmationDialog" parent="."]
auto_translate_mode = 1
initial_position = 2
size = Vector2i(472, 100)
ok_button_text = "Proceed"
dialog_text = "You have unsaved data! Are you sure you want to proceed?"
cancel_button_text = "Do Not"
[node name="FileDoesntExistDialog" type="AcceptDialog" parent="."]
initial_position = 2
dialog_text = "The specified file does not exist."
[node name="EmptyStringDialog" type="AcceptDialog" parent="."]
auto_translate_mode = 1
initial_position = 2
dialog_text = "String cannot be blank."
[node name="NoShowtapeLoadedDialog" type="AcceptDialog" parent="."]
auto_translate_mode = 1
initial_position = 2
dialog_text = "There is no showtape currently loaded."
[node name="IncorrectShowtapeDialog" type="AcceptDialog" parent="."]
auto_translate_mode = 1
initial_position = 2
dialog_text = "This showtape is not compatible with the currently selected stage."
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_20noo")
[node name="SubViewport" type="SubViewport" parent="."] [node name="SubViewport" type="SubViewport" parent="."]
size = Vector2i(1280, 720) size = Vector2i(1280, 720)
@ -112,23 +170,6 @@ offset_right = -4.0
offset_bottom = 44.0 offset_bottom = 44.0
grow_horizontal = 2 grow_horizontal = 2
[node name="Wordmark" type="Label" parent="MenuBar"]
layout_mode = 1
anchors_preset = -1
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -228.0
offset_top = -16.0
offset_right = -4.0
offset_bottom = 16.0
grow_horizontal = 0
grow_vertical = 2
text = "Pneumatic Plaything v0.3"
horizontal_alignment = 1
vertical_alignment = 1
[node name="StageSelector" type="OptionButton" parent="MenuBar"] [node name="StageSelector" type="OptionButton" parent="MenuBar"]
layout_mode = 0 layout_mode = 0
offset_left = 4.0 offset_left = 4.0
@ -140,45 +181,63 @@ item_count = 1
popup/item_0/text = "Helen House (Custom)" popup/item_0/text = "Helen House (Custom)"
popup/item_0/id = 0 popup/item_0/id = 0
[node name="LoadShowtapeButton" type="Button" parent="MenuBar"] [node name="MenuButton" type="MenuButton" parent="MenuBar"]
layout_mode = 0 layout_mode = 0
offset_left = 264.0 offset_left = 264.0
offset_top = 4.0 offset_top = 4.0
offset_right = 392.0 offset_right = 392.0
offset_bottom = 36.0 offset_bottom = 36.0
text = "Load Showtape" text = "Showtape"
flat = false
item_count = 3
popup/item_0/text = "New"
popup/item_0/id = 0
popup/item_1/text = "Load"
popup/item_1/id = 1
popup/item_2/text = "Save"
popup/item_2/id = 2
[node name="NewShowtapeButton" type="Button" parent="MenuBar"] [node name="ControlsButton" type="Button" parent="MenuBar"]
layout_mode = 0 layout_mode = 0
offset_left = 396.0 offset_left = 396.0
offset_top = 4.0 offset_top = 4.0
offset_right = 524.0 offset_right = 524.0
offset_bottom = 36.0 offset_bottom = 36.0
text = "New Showtape" text = "Controls"
[node name="SaveShowtapeButton" type="Button" parent="MenuBar"] [node name="CreditsButton" type="Button" parent="MenuBar"]
layout_mode = 0 layout_mode = 0
offset_left = 528.0 offset_left = 528.0
offset_top = 4.0 offset_top = 4.0
offset_right = 656.0 offset_right = 656.0
offset_bottom = 36.0 offset_bottom = 36.0
text = "Save Showtape" text = "Credits"
[node name="ControlsButton" type="Button" parent="MenuBar"] [node name="Wordmark" type="Label" parent="MenuBar"]
layout_mode = 1
anchors_preset = -1
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -232.0
offset_top = -16.0
offset_right = -8.0
offset_bottom = 16.0
grow_horizontal = 0
grow_vertical = 2
text = "Pneumatic Plaything v0.3"
horizontal_alignment = 2
vertical_alignment = 1
[node name="EditingLabel" type="Label" parent="MenuBar"]
layout_mode = 0 layout_mode = 0
offset_left = 660.0 offset_left = 660.0
offset_top = 4.0 offset_top = 4.0
offset_right = 788.0 offset_right = 899.0
offset_bottom = 36.0 offset_bottom = 36.0
text = "Controls" text = "No showtape loaded."
vertical_alignment = 1
[node name="CreditsButton" type="Button" parent="MenuBar"]
layout_mode = 0
offset_left = 792.0
offset_top = 4.0
offset_right = 920.0
offset_bottom = 36.0
text = "Credits"
[node name="SequencerPanel" type="Panel" parent="."] [node name="SequencerPanel" type="Panel" parent="."]
layout_mode = 1 layout_mode = 1
@ -342,7 +401,7 @@ offset_top = 4.0
offset_right = 12.0 offset_right = 12.0
offset_bottom = -4.0 offset_bottom = -4.0
grow_vertical = 2 grow_vertical = 2
max_value = 18.0 max_value = 31.0
step = 1.0 step = 1.0
[node name="InvisibleMask" type="Control" parent="SequencerPanel/TimelinePanel"] [node name="InvisibleMask" type="Control" parent="SequencerPanel/TimelinePanel"]
@ -416,10 +475,14 @@ theme_override_styles/normal = SubResource("StyleBoxEmpty_othvt")
[node name="DialogPanel" type="Panel" parent="ControlsScreen"] [node name="DialogPanel" type="Panel" parent="ControlsScreen"]
layout_mode = 1 layout_mode = 1
anchors_preset = -1 anchors_preset = -1
anchor_left = 0.3 anchor_left = 0.5
anchor_top = 0.2 anchor_top = 0.5
anchor_right = 0.7 anchor_right = 0.5
anchor_bottom = 0.8 anchor_bottom = 0.5
offset_left = -256.0
offset_top = -192.0
offset_right = 256.0
offset_bottom = 192.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
@ -437,7 +500,7 @@ Fast Forward: Shift + Right Arrow
Fast Reverse: Shift + Left Fast Reverse: Shift + Left
Step Forward: Right Arrow Step Forward: Right Arrow
Step Backward: Left Arrow Step Backward: Left Arrow
Go to start of showtape: Home Stop: Home
Change Camera Angle: Tab" Change Camera Angle: Tab"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
@ -473,10 +536,14 @@ theme_override_styles/normal = SubResource("StyleBoxEmpty_othvt")
[node name="DialogPanel" type="Panel" parent="CreditsScreen"] [node name="DialogPanel" type="Panel" parent="CreditsScreen"]
layout_mode = 1 layout_mode = 1
anchors_preset = -1 anchors_preset = -1
anchor_left = 0.3 anchor_left = 0.5
anchor_top = 0.2 anchor_top = 0.5
anchor_right = 0.7 anchor_right = 0.5
anchor_bottom = 0.8 anchor_bottom = 0.5
offset_left = -256.0
offset_top = -192.0
offset_right = 256.0
offset_bottom = 192.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
@ -500,6 +567,351 @@ or Creative Engineering Inc."
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="ShowtapeNewScreen" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="InputEater" type="Button" parent="ShowtapeNewScreen"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/focus = SubResource("StyleBoxEmpty_wy7jo")
theme_override_styles/disabled_mirrored = SubResource("StyleBoxEmpty_v0ton")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_20noo")
theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_mch36")
theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_fxi2g")
theme_override_styles/hover_mirrored = SubResource("StyleBoxEmpty_bdf35")
theme_override_styles/hover = SubResource("StyleBoxEmpty_j2w5p")
theme_override_styles/pressed_mirrored = SubResource("StyleBoxEmpty_bv2rw")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_gx718")
theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_gu086")
theme_override_styles/normal = SubResource("StyleBoxEmpty_othvt")
[node name="DialogPanel" type="Panel" parent="ShowtapeNewScreen"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -256.0
offset_top = -128.0
offset_right = 256.0
offset_bottom = 128.0
grow_horizontal = 2
grow_vertical = 2
[node name="DialogLabel" type="Label" parent="ShowtapeNewScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_right = 0.5
offset_left = -96.0
offset_top = 4.0
offset_right = 96.0
offset_bottom = 36.0
grow_horizontal = 2
text = "Create New Showtape"
horizontal_alignment = 1
vertical_alignment = 1
[node name="AudioTypeLabel" type="Label" parent="ShowtapeNewScreen/DialogPanel"]
layout_mode = 0
offset_left = 8.0
offset_top = 40.0
offset_right = 264.0
offset_bottom = 72.0
text = "Audio File (WAV, MP3, or OGG)"
vertical_alignment = 1
[node name="AudioFilePath" type="TextEdit" parent="ShowtapeNewScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
offset_left = 4.0
offset_top = 76.0
offset_right = -104.0
offset_bottom = 112.0
grow_horizontal = 2
grow_vertical = 2
placeholder_text = "File Path"
[node name="AudioBrowseButton" type="Button" parent="ShowtapeNewScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -100.0
offset_top = 76.0
offset_right = -4.0
offset_bottom = 112.0
tooltip_text = "Browse for a file."
text = "Browse"
[node name="ShowNameLabel" type="Label" parent="ShowtapeNewScreen/DialogPanel"]
layout_mode = 0
offset_left = 8.0
offset_top = 116.0
offset_right = 264.0
offset_bottom = 148.0
text = "Showtape Name"
vertical_alignment = 1
[node name="ShowNameTextBox" type="TextEdit" parent="ShowtapeNewScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
offset_left = 4.0
offset_top = 152.0
offset_right = -4.0
offset_bottom = 188.0
grow_horizontal = 2
grow_vertical = 2
placeholder_text = "Show Name"
[node name="StageTypeLabel" type="Label" parent="ShowtapeNewScreen/DialogPanel"]
layout_mode = 0
offset_left = 8.0
offset_top = 192.0
offset_right = 264.0
offset_bottom = 224.0
text = "Creating for Helen House"
vertical_alignment = 1
[node name="CancelButton" type="Button" parent="ShowtapeNewScreen/DialogPanel"]
layout_mode = 0
offset_left = 309.0
offset_top = 216.0
offset_right = 405.0
offset_bottom = 248.0
text = "Cancel
"
[node name="CreateButton" type="Button" parent="ShowtapeNewScreen/DialogPanel"]
layout_mode = 0
offset_left = 408.0
offset_top = 216.0
offset_right = 504.0
offset_bottom = 248.0
text = "Create"
[node name="ShowtapeLoadScreen" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="InputEater" type="Button" parent="ShowtapeLoadScreen"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/focus = SubResource("StyleBoxEmpty_wy7jo")
theme_override_styles/disabled_mirrored = SubResource("StyleBoxEmpty_v0ton")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_20noo")
theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_mch36")
theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_fxi2g")
theme_override_styles/hover_mirrored = SubResource("StyleBoxEmpty_bdf35")
theme_override_styles/hover = SubResource("StyleBoxEmpty_j2w5p")
theme_override_styles/pressed_mirrored = SubResource("StyleBoxEmpty_bv2rw")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_gx718")
theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_gu086")
theme_override_styles/normal = SubResource("StyleBoxEmpty_othvt")
[node name="DialogPanel" type="Panel" parent="ShowtapeLoadScreen"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -256.0
offset_top = -128.0
offset_right = 256.0
offset_bottom = 128.0
grow_horizontal = 2
grow_vertical = 2
[node name="DialogLabel" type="Label" parent="ShowtapeLoadScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_right = 0.5
offset_left = -96.0
offset_top = 4.0
offset_right = 96.0
offset_bottom = 36.0
grow_horizontal = 2
text = "Load Showtape"
horizontal_alignment = 1
vertical_alignment = 1
[node name="InFileLabel" type="Label" parent="ShowtapeLoadScreen/DialogPanel"]
offset_left = 8.0
offset_top = 73.0
offset_right = 264.0
offset_bottom = 105.0
text = "File to load"
vertical_alignment = 1
[node name="InFilePath" type="TextEdit" parent="ShowtapeLoadScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
offset_left = 4.0
offset_top = 109.0
offset_right = -104.0
offset_bottom = 145.0
grow_horizontal = 2
grow_vertical = 2
placeholder_text = "File Path"
[node name="InBrowseButton" type="Button" parent="ShowtapeLoadScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -100.0
offset_top = 109.0
offset_right = -4.0
offset_bottom = 145.0
tooltip_text = "Browse for a file."
text = "Browse"
[node name="CancelButton" type="Button" parent="ShowtapeLoadScreen/DialogPanel"]
offset_left = 309.0
offset_top = 216.0
offset_right = 405.0
offset_bottom = 248.0
text = "Cancel
"
[node name="OpenButton" type="Button" parent="ShowtapeLoadScreen/DialogPanel"]
offset_left = 408.0
offset_top = 216.0
offset_right = 504.0
offset_bottom = 248.0
text = "Open"
[node name="ShowtapeSaveScreen" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="InputEater" type="Button" parent="ShowtapeSaveScreen"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/focus = SubResource("StyleBoxEmpty_wy7jo")
theme_override_styles/disabled_mirrored = SubResource("StyleBoxEmpty_v0ton")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_20noo")
theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_mch36")
theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_fxi2g")
theme_override_styles/hover_mirrored = SubResource("StyleBoxEmpty_bdf35")
theme_override_styles/hover = SubResource("StyleBoxEmpty_j2w5p")
theme_override_styles/pressed_mirrored = SubResource("StyleBoxEmpty_bv2rw")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_gx718")
theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_gu086")
theme_override_styles/normal = SubResource("StyleBoxEmpty_othvt")
[node name="DialogPanel" type="Panel" parent="ShowtapeSaveScreen"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -256.0
offset_top = -128.0
offset_right = 256.0
offset_bottom = 128.0
grow_horizontal = 2
grow_vertical = 2
[node name="DialogLabel" type="Label" parent="ShowtapeSaveScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_right = 0.5
offset_left = -96.0
offset_top = 4.0
offset_right = 96.0
offset_bottom = 36.0
grow_horizontal = 2
text = "Save Showtape"
horizontal_alignment = 1
vertical_alignment = 1
[node name="OutFileLabel" type="Label" parent="ShowtapeSaveScreen/DialogPanel"]
layout_mode = 0
offset_left = 8.0
offset_top = 73.0
offset_right = 264.0
offset_bottom = 105.0
text = "File to save as"
vertical_alignment = 1
[node name="OutFilePath" type="TextEdit" parent="ShowtapeSaveScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
offset_left = 4.0
offset_top = 109.0
offset_right = -104.0
offset_bottom = 145.0
grow_horizontal = 2
grow_vertical = 2
placeholder_text = "File Path"
[node name="OutBrowseButton" type="Button" parent="ShowtapeSaveScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -100.0
offset_top = 109.0
offset_right = -4.0
offset_bottom = 145.0
tooltip_text = "Browse for a file."
text = "Browse"
[node name="CancelButton" type="Button" parent="ShowtapeSaveScreen/DialogPanel"]
layout_mode = 0
offset_left = 309.0
offset_top = 216.0
offset_right = 405.0
offset_bottom = 248.0
text = "Cancel
"
[node name="CreateButton" type="Button" parent="ShowtapeSaveScreen/DialogPanel"]
layout_mode = 0
offset_left = 408.0
offset_top = 216.0
offset_right = 504.0
offset_bottom = 248.0
text = "Save"
[node name="CameraFullScreen" type="TextureRect" parent="."] [node name="CameraFullScreen" type="TextureRect" parent="."]
visible = false visible = false
layout_mode = 1 layout_mode = 1
@ -511,6 +923,11 @@ grow_vertical = 2
texture = SubResource("ViewportTexture_g6u4d") texture = SubResource("ViewportTexture_g6u4d")
expand_mode = 2 expand_mode = 2
[connection signal="file_selected" from="OpenAudioFileDialog" to="." method="_on_open_audio_file_dialog_file_selected"]
[connection signal="file_selected" from="OpenShowtapeFileDialog" to="." method="_on_open_showtape_file_dialog_file_selected"]
[connection signal="file_selected" from="SaveShowtapeFileDialog" to="." method="_on_save_showtape_file_dialog_file_selected"]
[connection signal="confirmed" from="NewOverwriteConfirmationDialog" to="." method="_on_new_overwrite_confirmation_dialog_confirmed"]
[connection signal="confirmed" from="LoadOverwriteConfirmationDialog" to="." method="_on_load_overwrite_confirmation_dialog_confirmed"]
[connection signal="pressed" from="MenuBar/ControlsButton" to="." method="_on_controls_button_pressed"] [connection signal="pressed" from="MenuBar/ControlsButton" to="." method="_on_controls_button_pressed"]
[connection signal="pressed" from="MenuBar/CreditsButton" to="." method="_on_credits_button_pressed"] [connection signal="pressed" from="MenuBar/CreditsButton" to="." method="_on_credits_button_pressed"]
[connection signal="pressed" from="SequencerPanel/TransportControls/Centered/StepBackwardsButton" to="." method="_on_step_backwards_button_pressed"] [connection signal="pressed" from="SequencerPanel/TransportControls/Centered/StepBackwardsButton" to="." method="_on_step_backwards_button_pressed"]
@ -523,5 +940,17 @@ expand_mode = 2
[connection signal="pressed" from="SequencerPanel/TransportControls/Centered/StepForwardButton" to="." method="_on_step_forward_button_pressed"] [connection signal="pressed" from="SequencerPanel/TransportControls/Centered/StepForwardButton" to="." method="_on_step_forward_button_pressed"]
[connection signal="toggled" from="SequencerPanel/TransportControls/RecordButton" to="." method="_on_record_button_toggled"] [connection signal="toggled" from="SequencerPanel/TransportControls/RecordButton" to="." method="_on_record_button_toggled"]
[connection signal="value_changed" from="SequencerPanel/TimelinePanel/VScrollBar" to="." method="_on_v_scroll_bar_value_changed"] [connection signal="value_changed" from="SequencerPanel/TimelinePanel/VScrollBar" to="." method="_on_v_scroll_bar_value_changed"]
[connection signal="pressed" from="ControlsScreen/InputEater" to="." method="_on_controls_input_eater_pressed"] [connection signal="pressed" from="ControlsScreen/InputEater" to="." method="_on_input_eater_pressed"]
[connection signal="pressed" from="CreditsScreen/InputEater" to="." method="_on_credits_input_eater_pressed"] [connection signal="pressed" from="CreditsScreen/InputEater" to="." method="_on_input_eater_pressed"]
[connection signal="pressed" from="ShowtapeNewScreen/InputEater" to="." method="_on_input_eater_pressed"]
[connection signal="pressed" from="ShowtapeNewScreen/DialogPanel/AudioBrowseButton" to="." method="_on_showtape_new_audio_browse_button_pressed"]
[connection signal="pressed" from="ShowtapeNewScreen/DialogPanel/CancelButton" to="." method="_on_showtape_new_cancel_button_pressed"]
[connection signal="pressed" from="ShowtapeNewScreen/DialogPanel/CreateButton" to="." method="_on_showtape_new_create_button_pressed"]
[connection signal="pressed" from="ShowtapeLoadScreen/InputEater" to="." method="_on_input_eater_pressed"]
[connection signal="pressed" from="ShowtapeLoadScreen/DialogPanel/InBrowseButton" to="." method="_on_showtape_load_in_browse_button_pressed"]
[connection signal="pressed" from="ShowtapeLoadScreen/DialogPanel/CancelButton" to="." method="_on_showtape_load_cancel_button_pressed"]
[connection signal="pressed" from="ShowtapeLoadScreen/DialogPanel/OpenButton" to="." method="_on_showtape_load_open_button_pressed"]
[connection signal="pressed" from="ShowtapeSaveScreen/InputEater" to="." method="_on_input_eater_pressed"]
[connection signal="pressed" from="ShowtapeSaveScreen/DialogPanel/OutBrowseButton" to="." method="_on_showtape_save_out_browse_button_pressed"]
[connection signal="pressed" from="ShowtapeSaveScreen/DialogPanel/CancelButton" to="." method="_on_showtape_save_cancel_button_pressed"]
[connection signal="pressed" from="ShowtapeSaveScreen/DialogPanel/CreateButton" to="." method="_on_showtape_save_create_button_pressed"]

View file

@ -176,3 +176,146 @@ offset_bottom = 832.0
grow_horizontal = 1 grow_horizontal = 1
movement_bit = 19 movement_bit = 19
movement_name = "Body Lean" movement_name = "Body Lean"
[node name="Unused20" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 836.0
offset_bottom = 876.0
grow_horizontal = 1
movement_bit = 20
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused21" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 880.0
offset_bottom = 920.0
grow_horizontal = 1
movement_bit = 21
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused22" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 924.0
offset_bottom = 964.0
grow_horizontal = 1
movement_bit = 22
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused23" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 968.0
offset_bottom = 1008.0
grow_horizontal = 1
movement_bit = 23
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused24" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 1012.0
offset_bottom = 1052.0
grow_horizontal = 1
movement_bit = 24
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused25" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 1056.0
offset_bottom = 1096.0
grow_horizontal = 1
movement_bit = 25
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused26" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 1100.0
offset_bottom = 1140.0
grow_horizontal = 1
movement_bit = 26
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused27" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 1144.0
offset_bottom = 1184.0
grow_horizontal = 1
movement_bit = 27
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused28" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 1188.0
offset_bottom = 1228.0
grow_horizontal = 1
movement_bit = 28
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused29" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 1232.0
offset_bottom = 1272.0
grow_horizontal = 1
movement_bit = 29
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused30" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 1276.0
offset_bottom = 1316.0
grow_horizontal = 1
movement_bit = 30
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused31" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 1320.0
offset_bottom = 1360.0
grow_horizontal = 1
movement_bit = 31
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"
[node name="Unused32" parent="." instance=ExtResource("1_g2q8r")]
layout_mode = 1
anchors_preset = -1
offset_top = 1364.0
offset_bottom = 1404.0
grow_horizontal = 1
movement_bit = 32
movement_name = "Unused"
flow_path = "None"
animatronic_path = "None"

View file

@ -5,11 +5,23 @@ var recording : bool = false
var index : int = 0 var index : int = 0
var playback_rate : int = 1 var playback_rate : int = 1
var transport_enabled : bool = false var transport_enabled : bool = false
var erase_validated : bool = false
var showtape_loaded : bool = false
var show_name : String
var current_stage : String = "Helen House"
var stages_info = {
# stage name, custom (bool), bits, flyout path, movement row table path, base scene path, ust character flag, ust stage flag
"Helen House": [true, 32, "res://Scenes/Stages/Helen House/HelenHouseFlyout.tscn", "res://Scenes/Stages/Helen House/HelenHouseMovementRows.tscn", "res://Scenes/Stages/Helen House/HelenHouse.tscn", "Mitzi/Helen", "Rockafire Explosion/3-Stage (Single Character)"]
}
signal step(amount: int) signal step(amount: int)
signal start_recording() signal start_recording()
signal end_recording() signal end_recording()
signal return_to_zero() signal return_to_zero()
signal erase_all()
func update_time_label() -> void: func update_time_label() -> void:
var frames = index % 60 var frames = index % 60
@ -33,7 +45,106 @@ func set_transport_enabled(enabled: bool):
func _ready() -> void: func _ready() -> void:
get_tree().get_root().size_changed.connect(_on_size_changed) get_tree().get_root().size_changed.connect(_on_size_changed)
erase_all.connect(_erase_all)
$MenuBar/MenuButton.get_popup().id_pressed.connect(_showtape_menu_button_pressed)
func _showtape_menu_button_pressed(id: int) -> void:
match (id):
0: #new
if (showtape_loaded): $NewOverwriteConfirmationDialog.show()
else: $ShowtapeNewScreen.visible = true
1: #load
if (showtape_loaded): $LoadOverwriteConfirmationDialog.show()
else: $ShowtapeLoadScreen.visible = true
2: #save
if (showtape_loaded): $ShowtapeSaveScreen.visible = true
else: $NoShowtapeLoadedDialog.show()
func _on_showtape_new_audio_browse_button_pressed() -> void:
$OpenAudioFileDialog.show()
func _on_open_audio_file_dialog_file_selected(path: String) -> void:
$ShowtapeNewScreen/DialogPanel/AudioFilePath.text = path
func _on_showtape_new_cancel_button_pressed() -> void:
$ShowtapeNewScreen/DialogPanel/AudioFilePath.text = ""
$ShowtapeNewScreen/DialogPanel/ShowNameTextBox.text = ""
$ShowtapeNewScreen.visible = false
func _on_showtape_new_create_button_pressed() -> void:
if (!FileAccess.file_exists($ShowtapeNewScreen/DialogPanel/AudioFilePath.text.strip_edges())):
$FileDoesntExistDialog.show()
return
if ($ShowtapeNewScreen/DialogPanel/ShowNameTextBox.text.strip_edges() == ""):
$EmptyStringDialog.show()
return
show_name = $ShowtapeNewScreen/DialogPanel/ShowNameTextBox.text.strip_edges()
$AudioStreamPlayer.stream = load_audio($ShowtapeNewScreen/DialogPanel/AudioFilePath.text.strip_edges())
set_transport_enabled(true) set_transport_enabled(true)
showtape_loaded = true
$MenuBar/EditingLabel.text = "Editing: " + show_name
$ShowtapeNewScreen/DialogPanel/AudioFilePath.text = ""
$ShowtapeNewScreen/DialogPanel/ShowNameTextBox.text = ""
$ShowtapeNewScreen.visible = false
func _on_new_overwrite_confirmation_dialog_confirmed() -> void:
erase_all.emit()
$ShowtapeNewScreen.visible = true
func _on_open_showtape_file_dialog_file_selected(path: String) -> void:
$ShowtapeLoadScreen/DialogPanel/InFilePath.text = path
func _on_showtape_load_in_browse_button_pressed() -> void:
$OpenShowtapeFileDialog.show()
func _on_showtape_load_cancel_button_pressed() -> void:
$ShowtapeLoadScreen/DialogPanel/InFilePath.text = ""
$ShowtapeLoadScreen.visible = false
func _on_showtape_load_open_button_pressed() -> void:
if (!FileAccess.file_exists($ShowtapeLoadScreen/DialogPanel/InFilePath.text.strip_edges())):
$FileDoesntExistDialog.show()
return
var file = FileAccess.open($ShowtapeLoadScreen/DialogPanel/InFilePath.text.strip_edges(), FileAccess.READ)
var content = file.get_as_text()
var header = content.split(";")[0].split(",")
if ((int(header[3]) != stages_info[current_stage][1]) || (header[4] != stages_info[current_stage][6])|| (header[5] != stages_info[current_stage][5])):
$IncorrectShowtapeDialog.dialog_text = "This showtape is not compatible with the currently selected stage.\nShowtape stage type: %s\nShowtape character(s): %s" % [header[4], header[5]]
$IncorrectShowtapeDialog.show()
return
show_name = header[2]
plot_data(content.split(";")[1])
$AudioStreamPlayer.stream = load_audio_from_buffer(Marshalls.base64_to_raw(content.split(";")[2]))
set_transport_enabled(true)
showtape_loaded = true
$MenuBar/EditingLabel.text = "Editing: " + show_name
$ShowtapeLoadScreen/DialogPanel/InFilePath.text = ""
$ShowtapeLoadScreen.visible = false
func _on_load_overwrite_confirmation_dialog_confirmed() -> void:
erase_all.emit()
$ShowtapeLoadScreen.visible = true
func _on_showtape_save_out_browse_button_pressed() -> void:
$SaveShowtapeFileDialog.show()
func _on_showtape_save_create_button_pressed() -> void:
var header = "UST,1,"+show_name.replace(",", "_").replace(";", "_")+","+str(stages_info[current_stage][1])+","+stages_info[current_stage][6]+","+stages_info[current_stage][5]+";"
var data_out_string = save_data()
var file = FileAccess.open($ShowtapeSaveScreen/DialogPanel/OutFilePath.text, FileAccess.WRITE)
file.store_string(header+data_out_string+";"+Marshalls.raw_to_base64($AudioStreamPlayer.stream.data))
file.close()
$ShowtapeSaveScreen/DialogPanel/OutFilePath.text = ""
$ShowtapeSaveScreen.visible = false
func _on_showtape_save_cancel_button_pressed() -> void:
$ShowtapeSaveScreen/DialogPanel/OutFilePath.text = ""
$ShowtapeSaveScreen.visible = false
func _on_save_showtape_file_dialog_file_selected(path: String) -> void:
$ShowtapeSaveScreen/DialogPanel/OutFilePath.text = path
func _input(event: InputEvent) -> void: func _input(event: InputEvent) -> void:
if event.is_action_pressed("toggle_editor_screen"): if event.is_action_pressed("toggle_editor_screen"):
@ -63,6 +174,28 @@ func _physics_process(_delta: float) -> void:
if (index <= 0): _on_stop_button_pressed() if (index <= 0): _on_stop_button_pressed()
update_time_label() update_time_label()
func load_audio(path: String) -> AudioStream:
var sound
match (path.split(".")[-1]):
"mp3":
sound = AudioStreamMP3.load_from_file(path)
"wav":
sound = AudioStreamWAV.load_from_file(path)
"ogg":
sound = AudioStreamOggVorbis.load_from_file(path)
return sound
func load_audio_from_buffer(data: PackedByteArray) -> AudioStream:
var sound
match (data[0]):
73:
sound = AudioStreamMP3.load_from_buffer(data)
82:
sound = AudioStreamWAV.load_from_buffer(data)
79:
sound = AudioStreamOggVorbis.load_from_buffer(data)
return sound
func _on_size_changed() -> void: func _on_size_changed() -> void:
$SubViewport.size = $ColorRect.size $SubViewport.size = $ColorRect.size
@ -72,15 +205,29 @@ func _on_controls_button_pressed() -> void:
func _on_credits_button_pressed() -> void: func _on_credits_button_pressed() -> void:
$CreditsScreen.visible = true $CreditsScreen.visible = true
func _on_controls_input_eater_pressed() -> void: func _on_input_eater_pressed() -> void:
$ControlsScreen.visible = false $ControlsScreen.visible = false
func _on_credits_input_eater_pressed() -> void:
$CreditsScreen.visible = false $CreditsScreen.visible = false
$ShowtapeNewScreen.visible = false
$ShowtapeLoadScreen.visible = false
$ShowtapeSaveScreen.visible = false
func _on_v_scroll_bar_value_changed(value: float) -> void: func _on_v_scroll_bar_value_changed(value: float) -> void:
$SequencerPanel/TimelinePanel/InvisibleMask/RowsHandle.position.y = value * -44 $SequencerPanel/TimelinePanel/InvisibleMask/RowsHandle.position.y = value * -44
func _erase_all() -> void:
playing = false
$AudioStreamPlayer.stop()
$AudioStreamPlayer.seek(0)
$SequencerPanel/TransportControls/RecordButton.button_pressed = false
index = 0
update_time_label()
show_name = ""
$AudioStreamPlayer.stream = null
set_transport_enabled(false)
showtape_loaded = false
$MenuBar/EditingLabel.text = "No showtape loaded."
func _on_play_button_pressed() -> void: func _on_play_button_pressed() -> void:
playback_rate = 1 playback_rate = 1
@ -141,3 +288,41 @@ func _on_stop_button_pressed() -> void:
index = 0 index = 0
return_to_zero.emit() return_to_zero.emit()
update_time_label() update_time_label()
func save_data() -> String:
var write_out : String = ""
var temp_data = []
var longest_channel = 0
for movement_row in $SequencerPanel/TimelinePanel/InvisibleMask/RowsHandle.get_child(0).get_children():
temp_data.append(movement_row.movements)
if (movement_row.movements.size() > longest_channel): longest_channel = movement_row.movements.size()
for i in range(longest_channel+1):
var frame_byte = 0
for j in range(stages_info[current_stage][1]):
if (index_get_safe(i, temp_data[j])): frame_byte += 1 << j;
write_out += ("%0"+str(stages_info[current_stage][1]/4)+"X,") % frame_byte
return write_out
func plot_data(data: String):
start_recording.emit()
for frame_string in data.split(","):
if (frame_string == ""): continue
var frame_byte = frame_string.hex_to_int()
for i in range(stages_info[current_stage][1]):
var er = false
if ((frame_byte & int(pow(2, i))) >> i == 1):
print("match at %d on frame %d" % [i, frame_byte])
er = true
$SequencerPanel/TimelinePanel/InvisibleMask/RowsHandle.get_child(0).get_child(i).etching = er
step.emit(1)
for movement_row in $SequencerPanel/TimelinePanel/InvisibleMask/RowsHandle.get_child(0).get_children():
movement_row.etching = false
end_recording.emit()
return_to_zero.emit()
func index_get_safe(cindex: int, data: Array[bool]) -> bool:
if (cindex > data.size()-1): return false
if (cindex < 0): return false
var out = data.get(cindex)
if (out == null): return false
return out

View file

@ -5,6 +5,7 @@ extends Panel
@export var flow_path : String = "../../../../../../HelenHouseFlyout/FlowControls/" @export var flow_path : String = "../../../../../../HelenHouseFlyout/FlowControls/"
@export var animatronic_path : String = "../../../../../../SubViewport/HelenHouse/3stHelen" @export var animatronic_path : String = "../../../../../../SubViewport/HelenHouse/3stHelen"
@export var movements : Array[bool] @export var movements : Array[bool]
@export var etching: bool = false
var in_flow : float = 1.0 var in_flow : float = 1.0
var out_flow : float = 1.0 var out_flow : float = 1.0
@ -14,7 +15,6 @@ var current_index : int = 0
var binding : bool = false var binding : bool = false
var held_on_previous_frame : bool = false var held_on_previous_frame : bool = false
var playback_held_on_previous_frame : bool = false var playback_held_on_previous_frame : bool = false
var etching: bool = false
var recording : bool = false var recording : bool = false
var playing : bool = true var playing : bool = true
var current_block_indicator var current_block_indicator
@ -74,6 +74,10 @@ func _return_to_zero():
$MovementsBG/InvisibleMask/MovementsHandle.position.x = 120 $MovementsBG/InvisibleMask/MovementsHandle.position.x = 120
movement_out.emit(movement_name, out_flow) movement_out.emit(movement_name, out_flow)
func _erase_all() -> void:
_return_to_zero()
_on_clear_button_pressed()
func _start_recording(): func _start_recording():
recording = true recording = true
@ -96,7 +100,6 @@ func _update_out_flow(new_value: float) -> void:
out_flow = new_value out_flow = new_value
func _ready() -> void: func _ready() -> void:
var animatronic = get_node(animatronic_path)
if (flow_path != "None"): if (flow_path != "None"):
var if_node = get_node(flow_path + "InFlows/" + movement_name.replace(" ", "") + "Flow") var if_node = get_node(flow_path + "InFlows/" + movement_name.replace(" ", "") + "Flow")
var of_node = get_node(flow_path + "OutFlows/" + movement_name.replace(" ", "") + "Flow") var of_node = get_node(flow_path + "OutFlows/" + movement_name.replace(" ", "") + "Flow")
@ -104,6 +107,8 @@ func _ready() -> void:
of_node.value_updated.connect(self._update_out_flow) of_node.value_updated.connect(self._update_out_flow)
in_flow = if_node.value in_flow = if_node.value
out_flow = of_node.value out_flow = of_node.value
if (animatronic_path != "None"):
var animatronic = get_node(animatronic_path)
movement_in.connect(animatronic._movement_in) movement_in.connect(animatronic._movement_in)
movement_out.connect(animatronic._movement_out) movement_out.connect(animatronic._movement_out)
movement_in.connect(self._movement_in) movement_in.connect(self._movement_in)
@ -113,6 +118,7 @@ func _ready() -> void:
editor.start_recording.connect(_start_recording) editor.start_recording.connect(_start_recording)
editor.end_recording.connect(_end_recording) editor.end_recording.connect(_end_recording)
editor.return_to_zero.connect(_return_to_zero) editor.return_to_zero.connect(_return_to_zero)
editor.erase_all.connect(_erase_all)
current_block_indicator = load("res://Scenes/GUI/Controls/MovementFrameIndicatorOff.tscn").instantiate() current_block_indicator = load("res://Scenes/GUI/Controls/MovementFrameIndicatorOff.tscn").instantiate()
update_text() update_text()
@ -160,3 +166,4 @@ func _on_clear_button_pressed() -> void:
movements = [] movements = []
for indicator in $MovementsBG/InvisibleMask/MovementsHandle.get_children(): for indicator in $MovementsBG/InvisibleMask/MovementsHandle.get_children():
indicator.queue_free() indicator.queue_free()
current_block_indicator = load("res://Scenes/GUI/Controls/MovementFrameIndicatorOff.tscn").instantiate()

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://c1hjkaatw2koh"
path="res://.godot/imported/placeholder_delete_this_file_later_please_its_so_large.wav-b6f8898825898b7c991e2e55bff2c0ab.sample"
[deps]
source_file="res://UI/placeholder_delete_this_file_later_please_its_so_large.wav"
dest_files=["res://.godot/imported/placeholder_delete_this_file_later_please_its_so_large.wav-b6f8898825898b7c991e2e55bff2c0ab.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

View file

@ -139,7 +139,8 @@ ui_text_dedent={
} }
ui_text_backspace={ ui_text_backspace={
"deadzone": 0.5, "deadzone": 0.5,
"events": [] "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":4194308,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
} }
ui_text_backspace_word={ ui_text_backspace_word={
"deadzone": 0.5, "deadzone": 0.5,