From fe6efb0f1d5c1e64539a17140b4b8a9080b034ed Mon Sep 17 00:00:00 2001 From: Variable <77773850+Variable-ind@users.noreply.github.com> Date: Sun, 24 Nov 2024 17:37:02 +0500 Subject: [PATCH] fixed recorder label not updating when project is changed (#1139) --- assets/graphics/recorder/start.png | Bin 218 -> 374 bytes assets/graphics/recorder/stop.png | Bin 162 -> 136 bytes src/UI/Recorder/Recorder.gd | 4 ++++ src/UI/Recorder/Recorder.tscn | 15 +++++++++------ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/assets/graphics/recorder/start.png b/assets/graphics/recorder/start.png index d030cbcc44178eb8ada91953fd8f359687755962..889697cebcf333b34eb47a26425357c0bda7d0a0 100644 GIT binary patch literal 374 zcmV-+0g3*JP)Px$FiAu~R9J=WnL!eRAPhyJx2$qJw8ylobSw(_p%9GIw-YFN{$Zv9-Zf&4apT5J zA@~-xswY7tIci@*{G%4KDN=cOa1YrOR2~|nAxt3R>;O$+f)g)x)(Ai6`Ox-S7U?ua z@oWbwd?v|(zC=#^v=I@mkxfD5&%_T6TEaw)_}7EBFd-FxNG9(gTr=;-o=drx@E$I4 zN*hXALs(MBJ6BFwOL$Ky@hJo^TGLmdC_N%&q^`}RM|=?d!W!ddGwEE%sP&B0zgN;% z<}a;9R=Q@3)RIztn@P7is?y?~A55dxHCNYU($IEG^Dmv-05}IGt+hw@TdF`Jt5$4YF2y>^Vgt_x+!rV;&VeZa_Fn7DP$J9Myim4mh9GZ9IZ>$Te ULP|hJcK`qY07*qoM6N<$f~Bva2mk;8 literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1IgDV{ElAr`$? zuQ>8K7znTi99C43IdoR$*jbsTBZ@7ds&oJSOzUXfe`(gfo(yf#lUMlJXUR{GTx0s7 zm9_Fg(xL9i3^Rv_>t;7A?v{1M@k?Ev(AOrc=wD3dM#1JIlIfh zZub1fjLY|y{?L50z@7Pf;u7zW-)Apw4q(}>&)&A_!fWlWU3wAxXUdLoe(DKuT4HLL Q2y`EVr>mdKI;Vst03H2SMF0Q* diff --git a/assets/graphics/recorder/stop.png b/assets/graphics/recorder/stop.png index 238fa3b7b08f8d7f41c733f86038de536810470c..5d6eca2ee2bae736865565ff07dbe8169152d3eb 100644 GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}PM$7~Ar`&K zH6I=vtY_n56kf_^00bKpil01v+Ij8AhlkES(a>e;jyGL@Cx+_EIun0>C8^fUqiYplbm3lmhB=gqb6KjdDhxUwzrvU90^ zzm!GRgB6V`(jD_Ib~3)GGVqcv;&EjQ`EI1l%v`#ffnlYgxL(Ap-yJ}E7(8A5T-G@y GGywp?MKNUn diff --git a/src/UI/Recorder/Recorder.gd b/src/UI/Recorder/Recorder.gd index caffce80b..b0421c602 100644 --- a/src/UI/Recorder/Recorder.gd +++ b/src/UI/Recorder/Recorder.gd @@ -55,6 +55,7 @@ class Recorder: dir.make_dir_recursive(save_directory) project.removed.connect(recorder_panel.finalize_recording.bind(project)) project.undo_redo.version_changed.connect(capture_frame) + recorder_panel.captured_label.text = "" func _notification(what: int) -> void: if what == NOTIFICATION_PREDELETE: @@ -100,6 +101,9 @@ func _on_project_switched() -> void: initialize_recording() start_button.set_pressed_no_signal(true) Global.change_button_texturerect(start_button.get_child(0), "stop.png") + captured_label.text = str( + "Saved: ", recorded_projects[Global.current_project].frames_captured + ) else: finalize_recording() start_button.set_pressed_no_signal(false) diff --git a/src/UI/Recorder/Recorder.tscn b/src/UI/Recorder/Recorder.tscn index 5204fcf88..6c1bac402 100644 --- a/src/UI/Recorder/Recorder.tscn +++ b/src/UI/Recorder/Recorder.tscn @@ -40,15 +40,18 @@ mouse_default_cursor_shape = 2 toggle_mode = true [node name="TextureRect" type="TextureRect" parent="ScrollContainer/CenterContainer/GridContainer/Start"] -layout_mode = 0 +layout_mode = 1 +anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -10.0 -offset_top = -10.5 -offset_right = 10.0 -offset_bottom = 10.5 +offset_left = -11.0 +offset_top = -11.0 +offset_right = 11.0 +offset_bottom = 11.0 +grow_horizontal = 2 +grow_vertical = 2 texture = ExtResource("1") expand_mode = 1 stretch_mode = 5 @@ -74,7 +77,7 @@ offset_bottom = 10.5 texture = ExtResource("3") stretch_mode = 5 -[node name="OpenFolder" type="Button" parent="ScrollContainer/CenterContainer/GridContainer"] +[node name="OpenFolder" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]] custom_minimum_size = Vector2(32, 32) layout_mode = 2 tooltip_text = "Open Folder"