startings of 0.3 and row clearing

This commit is contained in:
Persephone Bubblegum-Holidy 2025-05-25 09:05:31 -07:00
parent 8ee16d7d26
commit af364d0faa
8 changed files with 99 additions and 35 deletions

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://dtkqaw5533rxy"] [gd_scene load_steps=5 format=3 uid="uid://dtkqaw5533rxy"]
[ext_resource type="StyleBox" uid="uid://d17amc25o63p1" path="res://UI/Themes/MovementsPanelOverride.tres" id="1_d1xev"] [ext_resource type="StyleBox" uid="uid://d17amc25o63p1" path="res://UI/Themes/MovementsPanelOverride.tres" id="1_d1xev"]
[ext_resource type="Script" uid="uid://tn3aaldu7mm2" path="res://Scripts/MovementRow.gd" id="1_rm5t0"] [ext_resource type="Script" uid="uid://tn3aaldu7mm2" path="res://Scripts/MovementRow.gd" id="1_rm5t0"]
[ext_resource type="Texture2D" uid="uid://cn5xdrxdv622h" path="res://UI/SmallX.png" id="2_e7anl"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rm5t0"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rm5t0"]
bg_color = Color(0, 1, 0, 1) bg_color = Color(0, 1, 0, 1)
@ -36,6 +37,14 @@ tooltip_text = "Click to bind a key to this movement"
text = "0 - Name (Unbound)" text = "0 - Name (Unbound)"
alignment = 0 alignment = 0
[node name="ClearButton" type="Button" parent="."]
layout_mode = 0
offset_left = 244.0
offset_top = 4.0
offset_right = 260.0
offset_bottom = 20.0
icon = ExtResource("2_e7anl")
[node name="MovementsBG" type="Panel" parent="."] [node name="MovementsBG" type="Panel" parent="."]
layout_mode = 1 layout_mode = 1
anchors_preset = -1 anchors_preset = -1
@ -49,6 +58,7 @@ theme_override_styles/panel = ExtResource("1_d1xev")
[node name="InvisibleMask" type="Control" parent="MovementsBG"] [node name="InvisibleMask" type="Control" parent="MovementsBG"]
clip_contents = true clip_contents = true
layout_mode = 1 layout_mode = 1
anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
offset_left = 4.0 offset_left = 4.0
@ -64,3 +74,4 @@ offset_left = 120.0
offset_right = 120.0 offset_right = 120.0
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] [connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
[connection signal="pressed" from="ClearButton" to="." method="_on_clear_button_pressed"]

View file

@ -121,7 +121,7 @@ offset_right = -4.0
offset_bottom = 16.0 offset_bottom = 16.0
grow_horizontal = 0 grow_horizontal = 0
grow_vertical = 2 grow_vertical = 2
text = "Pneumatic Plaything v0.2" text = "Pneumatic Plaything v0.3"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
@ -137,7 +137,6 @@ 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="LoadShowtapeButton" type="Button" parent="MenuBar"]
visible = false
layout_mode = 0 layout_mode = 0
offset_left = 264.0 offset_left = 264.0
offset_top = 4.0 offset_top = 4.0
@ -146,7 +145,6 @@ offset_bottom = 36.0
text = "Load Showtape" text = "Load Showtape"
[node name="NewShowtapeButton" type="Button" parent="MenuBar"] [node name="NewShowtapeButton" type="Button" parent="MenuBar"]
visible = false
layout_mode = 0 layout_mode = 0
offset_left = 396.0 offset_left = 396.0
offset_top = 4.0 offset_top = 4.0
@ -155,7 +153,6 @@ offset_bottom = 36.0
text = "New Showtape" text = "New Showtape"
[node name="SaveShowtapeButton" type="Button" parent="MenuBar"] [node name="SaveShowtapeButton" type="Button" parent="MenuBar"]
visible = false
layout_mode = 0 layout_mode = 0
offset_left = 528.0 offset_left = 528.0
offset_top = 4.0 offset_top = 4.0
@ -165,17 +162,17 @@ text = "Save Showtape"
[node name="ControlsButton" type="Button" parent="MenuBar"] [node name="ControlsButton" type="Button" parent="MenuBar"]
layout_mode = 0 layout_mode = 0
offset_left = 264.0 offset_left = 660.0
offset_top = 4.0 offset_top = 4.0
offset_right = 392.0 offset_right = 788.0
offset_bottom = 36.0 offset_bottom = 36.0
text = "Controls" text = "Controls"
[node name="CreditsButton" type="Button" parent="MenuBar"] [node name="CreditsButton" type="Button" parent="MenuBar"]
layout_mode = 0 layout_mode = 0
offset_left = 396.0 offset_left = 792.0
offset_top = 4.0 offset_top = 4.0
offset_right = 524.0 offset_right = 920.0
offset_bottom = 36.0 offset_bottom = 36.0
text = "Credits" text = "Credits"
@ -229,6 +226,7 @@ offset_top = 4.0
offset_right = 44.0 offset_right = 44.0
offset_bottom = 44.0 offset_bottom = 44.0
tooltip_text = "Step backward 1 frame" tooltip_text = "Step backward 1 frame"
disabled = true
icon = ExtResource("3_r4ytj") icon = ExtResource("3_r4ytj")
[node name="FastBackwardsButton" type="Button" parent="SequencerPanel/TransportControls/Centered"] [node name="FastBackwardsButton" type="Button" parent="SequencerPanel/TransportControls/Centered"]
@ -238,6 +236,7 @@ offset_top = 4.0
offset_right = 88.0 offset_right = 88.0
offset_bottom = 44.0 offset_bottom = 44.0
tooltip_text = "Play backwards at 2x speed" tooltip_text = "Play backwards at 2x speed"
disabled = true
icon = ExtResource("4_wy7jo") icon = ExtResource("4_wy7jo")
[node name="PlayBackwardsButton" type="Button" parent="SequencerPanel/TransportControls/Centered"] [node name="PlayBackwardsButton" type="Button" parent="SequencerPanel/TransportControls/Centered"]
@ -247,6 +246,7 @@ offset_top = 4.0
offset_right = 132.0 offset_right = 132.0
offset_bottom = 44.0 offset_bottom = 44.0
tooltip_text = "Play backwards" tooltip_text = "Play backwards"
disabled = true
icon = ExtResource("3_mr8sb") icon = ExtResource("3_mr8sb")
[node name="PauseButton" type="Button" parent="SequencerPanel/TransportControls/Centered"] [node name="PauseButton" type="Button" parent="SequencerPanel/TransportControls/Centered"]
@ -256,6 +256,7 @@ offset_top = 4.0
offset_right = 176.0 offset_right = 176.0
offset_bottom = 44.0 offset_bottom = 44.0
tooltip_text = "Pause" tooltip_text = "Pause"
disabled = true
icon = ExtResource("4_ba3jn") icon = ExtResource("4_ba3jn")
[node name="StopButton" type="Button" parent="SequencerPanel/TransportControls/Centered"] [node name="StopButton" type="Button" parent="SequencerPanel/TransportControls/Centered"]
@ -265,6 +266,7 @@ offset_top = 4.0
offset_right = 220.0 offset_right = 220.0
offset_bottom = 44.0 offset_bottom = 44.0
tooltip_text = "Stop playback and return to frame 0" tooltip_text = "Stop playback and return to frame 0"
disabled = true
icon = ExtResource("8_20noo") icon = ExtResource("8_20noo")
[node name="PlayButton" type="Button" parent="SequencerPanel/TransportControls/Centered"] [node name="PlayButton" type="Button" parent="SequencerPanel/TransportControls/Centered"]
@ -274,6 +276,7 @@ offset_top = 4.0
offset_right = 264.0 offset_right = 264.0
offset_bottom = 44.0 offset_bottom = 44.0
tooltip_text = "Play" tooltip_text = "Play"
disabled = true
icon = ExtResource("3_g6u4d") icon = ExtResource("3_g6u4d")
[node name="FastForwardButton" type="Button" parent="SequencerPanel/TransportControls/Centered"] [node name="FastForwardButton" type="Button" parent="SequencerPanel/TransportControls/Centered"]
@ -283,6 +286,7 @@ offset_top = 4.0
offset_right = 308.0 offset_right = 308.0
offset_bottom = 44.0 offset_bottom = 44.0
tooltip_text = "Play at 2x speed" tooltip_text = "Play at 2x speed"
disabled = true
icon = ExtResource("8_v0ton") icon = ExtResource("8_v0ton")
[node name="StepForwardButton" type="Button" parent="SequencerPanel/TransportControls/Centered"] [node name="StepForwardButton" type="Button" parent="SequencerPanel/TransportControls/Centered"]
@ -292,6 +296,7 @@ offset_top = 4.0
offset_right = 352.0 offset_right = 352.0
offset_bottom = 44.0 offset_bottom = 44.0
tooltip_text = "Step forward 1 frame" tooltip_text = "Step forward 1 frame"
disabled = true
icon = ExtResource("9_20noo") icon = ExtResource("9_20noo")
[node name="RecordButton" type="Button" parent="SequencerPanel/TransportControls"] [node name="RecordButton" type="Button" parent="SequencerPanel/TransportControls"]
@ -308,6 +313,7 @@ offset_bottom = 20.0
grow_horizontal = 0 grow_horizontal = 0
grow_vertical = 2 grow_vertical = 2
tooltip_text = "Start recording" tooltip_text = "Start recording"
disabled = true
icon = ExtResource("10_wy7jo") icon = ExtResource("10_wy7jo")
[node name="TimelinePanel" type="Panel" parent="SequencerPanel"] [node name="TimelinePanel" type="Panel" parent="SequencerPanel"]

View file

@ -4,6 +4,7 @@ var playing : bool = false
var recording : bool = false 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
signal step(amount: int) signal step(amount: int)
signal start_recording() signal start_recording()
@ -18,14 +19,28 @@ func update_time_label() -> void:
$SequencerPanel/TransportControls/TimeLabel.text = "%d:%02d:%02d:%02d" % [hours, minutes, seconds, frames] $SequencerPanel/TransportControls/TimeLabel.text = "%d:%02d:%02d:%02d" % [hours, minutes, seconds, frames]
#$SequencerPanel/TransportControls/TimeLabel.text = str(index) #$SequencerPanel/TransportControls/TimeLabel.text = str(index)
func set_transport_enabled(enabled: bool):
$SequencerPanel/TransportControls/Centered/StepBackwardsButton.disabled = !enabled
$SequencerPanel/TransportControls/Centered/FastBackwardsButton.disabled = !enabled
$SequencerPanel/TransportControls/Centered/PlayBackwardsButton.disabled = !enabled
$SequencerPanel/TransportControls/Centered/PauseButton.disabled = !enabled
$SequencerPanel/TransportControls/Centered/StopButton.disabled = !enabled
$SequencerPanel/TransportControls/Centered/PlayButton.disabled = !enabled
$SequencerPanel/TransportControls/Centered/FastForwardButton.disabled = !enabled
$SequencerPanel/TransportControls/Centered/StepForwardButton.disabled = !enabled
$SequencerPanel/TransportControls/RecordButton.disabled = !enabled
transport_enabled = enabled
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)
set_transport_enabled(true)
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"):
$CameraPreview.visible = !$CameraPreview.visible; $CameraPreview.visible = !$CameraPreview.visible;
$CameraFullScreen.visible = !$CameraFullScreen.visible; $CameraFullScreen.visible = !$CameraFullScreen.visible;
elif event.is_action_pressed("sequencer_play_pause"): if (transport_enabled):
if event.is_action_pressed("sequencer_play_pause"):
if (playing): _on_pause_button_pressed() if (playing): _on_pause_button_pressed()
else: _on_play_button_pressed() else: _on_play_button_pressed()
elif event.is_action_pressed("sequencer_play_reverse"): elif event.is_action_pressed("sequencer_play_reverse"):

View file

@ -154,3 +154,9 @@ func _input(event: InputEvent) -> void:
binding = false binding = false
update_text() update_text()
return return
func _on_clear_button_pressed() -> void:
movements = []
for indicator in $MovementsBG/InvisibleMask/MovementsHandle.get_children():
indicator.queue_free()

BIN
UI/SmallX.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

34
UI/SmallX.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cn5xdrxdv622h"
path="res://.godot/imported/SmallX.png-fca237bd1b13d37241a1ac9e982c446b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/SmallX.png"
dest_files=["res://.godot/imported/SmallX.png-fca237bd1b13d37241a1ac9e982c446b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

View file

@ -11,7 +11,7 @@ config_version=5
[application] [application]
config/name="Pneumatic Plaything" config/name="Pneumatic Plaything"
config/version="v0.2" config/version="v0.3"
run/main_scene="uid://oiehbor0dlqx" run/main_scene="uid://oiehbor0dlqx"
config/features=PackedStringArray("4.4", "GL Compatibility") config/features=PackedStringArray("4.4", "GL Compatibility")
boot_splash/show_image=false boot_splash/show_image=false