From 2d790c2a7d1fa87b7b90d17f1b7bf8f66cdcc826 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 29 Dec 2025 02:29:35 +1300 Subject: [PATCH 1/6] Fixed issue where global scale factor does not apply after restart --- panels/UICore/UICore.tscn | 2 +- scripts/global/Interface.gd | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/panels/UICore/UICore.tscn b/panels/UICore/UICore.tscn index 0282e3dd..0a5946a8 100644 --- a/panels/UICore/UICore.tscn +++ b/panels/UICore/UICore.tscn @@ -16,7 +16,7 @@ [ext_resource type="Texture2D" uid="uid://cbwmiekm47cot" path="res://assets/icons/Action.svg" id="11_q5s34"] [ext_resource type="FontFile" uid="uid://cn86ussko5res" path="res://assets/font/IntelOneMono-VariableFont_wght.ttf" id="12_ucqqu"] [ext_resource type="LabelSettings" uid="uid://ci6veq1d2x5c4" path="res://assets/styles/DimText.tres" id="13_c1is7"] -[ext_resource type="Texture2D" uid="uid://bg5hotmf8svep" path="res://assets/logos/spectrum/dark_scaled/spectrum_dark-256x256.png" id="17_r218t"] +[ext_resource type="Texture2D" uid="uid://bsbmpadvx8wi8" path="res://assets/logos/spectrum/dark_scaled/spectrum_dark-256x256.png" id="17_r218t"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_aoeir"] content_margin_left = 4.0 diff --git a/scripts/global/Interface.gd b/scripts/global/Interface.gd index bcbd9cbc..cd5d6a40 100644 --- a/scripts/global/Interface.gd +++ b/scripts/global/Interface.gd @@ -778,3 +778,7 @@ func _load_config(p_config: InterfaceConfig) -> void: for script: Script in p_config.object_picker_default_items: _object_picker_index[script] = p_config.object_picker_default_items[script] + + await get_tree().process_frame + + set_scale_factor(_config.scale_factor) From 6ae7290a5182988ae1310837942490fb1066fd42 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 29 Dec 2025 02:36:32 +1300 Subject: [PATCH 2/6] Fixed issue with DataInputFloat not setting value --- components/DataInputs/DataInputFloat/DataInputFloat.gd | 2 +- components/DataInputs/DataInputFloat/DataInputFloat.tscn | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/DataInputs/DataInputFloat/DataInputFloat.gd b/components/DataInputs/DataInputFloat/DataInputFloat.gd index 9cf2ba0a..c79cf12e 100644 --- a/components/DataInputs/DataInputFloat/DataInputFloat.gd +++ b/components/DataInputs/DataInputFloat/DataInputFloat.gd @@ -45,6 +45,7 @@ func _settings_module_changed(p_module: SettingsModule) -> void: _spin_box.min_value = p_module.get_min() _ignore_next_update = true _spin_box.max_value = p_module.get_max() + _ignore_next_update = false ## Called when the orignal value is changed @@ -69,6 +70,5 @@ func _on_spin_box_value_changed(value: float) -> void: _ignore_next_update = false return - _update_outline_feedback(_module.get_setter().call(value)) _ignore_next_update = false diff --git a/components/DataInputs/DataInputFloat/DataInputFloat.tscn b/components/DataInputs/DataInputFloat/DataInputFloat.tscn index 11cc63ea..97cf7907 100644 --- a/components/DataInputs/DataInputFloat/DataInputFloat.tscn +++ b/components/DataInputs/DataInputFloat/DataInputFloat.tscn @@ -21,6 +21,7 @@ custom_minimum_size = Vector2(150, 0) layout_mode = 2 size_flags_horizontal = 10 step = 0.001 +select_all_on_focus = true [node name="Outline" type="Panel" parent="HBox/SpinBox"] modulate = Color(1, 1, 1, 0) From 3a28815783b33a5ab6673b858da31017d9debd3c Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 29 Dec 2025 03:18:26 +1300 Subject: [PATCH 3/6] Fixed issue where UIPanels in desk don't keep sizes after restart --- panels/UIDesk/DeskItemContainer.gd | 14 +++++++++----- panels/UIDesk/UIDesk.gd | 29 ++++++++++++++++------------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/panels/UIDesk/DeskItemContainer.gd b/panels/UIDesk/DeskItemContainer.gd index 35a09157..f59ed7b2 100644 --- a/panels/UIDesk/DeskItemContainer.gd +++ b/panels/UIDesk/DeskItemContainer.gd @@ -67,8 +67,10 @@ func _ready() -> void: _set_anchors_to_current_size.call_deferred() - update_label() set_process(false) + + await get_tree().process_frame + update_label() ## Process @@ -127,10 +129,10 @@ func get_panel() -> Variant: ## Updates the label to show the correct position and size func update_label() -> void: if size > Vector2(180, 180): - _label_node.text = "W:" + str(_target_size.x) + " H:" + str(_target_size.y) + "\nX:" + str(_target_position.x) + " Y:" + str(_target_position.y) + _label_node.text = "W:" + str(int(_target_size.x)) + " H:" + str(int(_target_size.y)) + "\nX:" + str(int(_target_position.x)) + " Y:" + str(int(_target_position.y)) _label_node.label_settings.font_size = 16 else: - _label_node.text = "W:" + str(_target_size.x) + "\nH:" + str(_target_size.y) + "\nX:" + str(_target_position.x) + "\nY:" + str(_target_position.y) + _label_node.text = "W:" + str(int(_target_size.x)) + "\nH:" + str(int(_target_size.y)) + "\nX:" + str(int(_target_position.x)) + "\nY:" + str(int(_target_position.y)) _label_node.label_settings.font_size = 10 @@ -138,8 +140,10 @@ func update_label() -> void: func serialize() -> Dictionary: return super.serialize().merged({ "type": "", - "position": [position.x, position.y], - "size": [size.x, size.y], + "anchor_left": get_anchor(SIDE_LEFT), + "anchor_right": get_anchor(SIDE_RIGHT), + "anchor_top": get_anchor(SIDE_TOP), + "anchor_bottom": get_anchor(SIDE_BOTTOM), "serialized_panel": _panel.serialize() if _panel else {} }) diff --git a/panels/UIDesk/UIDesk.gd b/panels/UIDesk/UIDesk.gd index 854b0cd4..deaf4fd2 100644 --- a/panels/UIDesk/UIDesk.gd +++ b/panels/UIDesk/UIDesk.gd @@ -208,26 +208,29 @@ func deserialize(p_serialized_data: Dictionary) -> void: var serialized_panel: Dictionary = type_convert(serialized_container.get("serialized_panel", []), TYPE_DICTIONARY) var panel_class: String = type_convert(serialized_panel.get("class", []), TYPE_STRING) - var saved_position: Array = type_convert(serialized_container.get("position", []), TYPE_ARRAY) - var panel_position: Vector2 = Vector2.ZERO - - var saved_size: Array = type_convert(serialized_container.get("size", []), TYPE_ARRAY) - var panel_size: Vector2 = Vector2.ZERO - - if saved_position.size() == 2: - panel_position = Vector2(type_convert(saved_position[0], TYPE_INT), type_convert(saved_position[1], TYPE_INT)) - - if saved_size.size() == 2: - panel_size = Vector2(type_convert(saved_size[0], TYPE_INT), type_convert(saved_size[1], TYPE_INT)) + var panel_anchor_left: float = type_convert(serialized_container.get("anchor_left"), TYPE_FLOAT) + var panel_anchor_right: float = type_convert(serialized_container.get("anchor_right"), TYPE_FLOAT) + var panel_anchor_top: float = type_convert(serialized_container.get("anchor_top"), TYPE_FLOAT) + var panel_anchor_bottom: float = type_convert(serialized_container.get("anchor_bottom"), TYPE_FLOAT) var panel: UIPanel = UIDB.instance_panel(panel_class) if not is_instance_valid(panel): continue - add_panel(panel, panel_position, panel_size) - panel.deserialize(serialized_panel) + var container: UIDeskItemContainer = add_panel(panel, Vector2.ZERO, Vector2.ZERO) + container.set_anchor(SIDE_LEFT, panel_anchor_left, true, true) + container.set_anchor(SIDE_RIGHT, panel_anchor_right, true, true) + container.set_anchor(SIDE_TOP, panel_anchor_top, true, true) + container.set_anchor(SIDE_BOTTOM, panel_anchor_bottom, true, true) + + container.set_offset(SIDE_LEFT, 0) + container.set_offset(SIDE_RIGHT, 0) + container.set_offset(SIDE_TOP, 0) + container.set_offset(SIDE_BOTTOM, 0) + + panel.deserialize(serialized_panel) set_grid_size(type_convert(p_serialized_data.get("grid_size", _grid_size), TYPE_INT)) From d292a694e6d03b539ab31b5759521a58703e54d9 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 29 Dec 2025 03:22:44 +1300 Subject: [PATCH 4/6] Fixed issue where edit button pressed state does not match UIPanel edit mode --- panels/UICore/SideBar/UICorePrimarySideBar.gd | 8 ++++++-- panels/UICore/UICore.tscn | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/panels/UICore/SideBar/UICorePrimarySideBar.gd b/panels/UICore/SideBar/UICorePrimarySideBar.gd index 1e5df19a..2c74f5f6 100644 --- a/panels/UICore/SideBar/UICorePrimarySideBar.gd +++ b/panels/UICore/SideBar/UICorePrimarySideBar.gd @@ -55,6 +55,9 @@ signal use_scroll_changed(p_use_scroll: bool) ## The ScrollContainer that contains the _tab_button_container @export var _tab_button_scroll: ScrollContainer +## The Edit Button +@export var _edit_button: Button + ## The UICore @export var _ui_core: UICore @@ -203,9 +206,11 @@ func switch_to_tab(p_tab: TabItem) -> void: _current_tab = p_tab _current_empty_tab = -1 + _edit_button.set_pressed_no_signal(false) if is_instance_valid(_current_tab): Interface.show_and_fade(_current_tab.get_panel()) + _edit_button.set_pressed_no_signal(_current_tab.get_panel().get_edit_mode()) if _current_tab.get_panel().get_edit_mode(): Interface.show_and_fade(_current_tab.get_panel().get_menu_bar()) @@ -584,8 +589,7 @@ class TabItem extends RefCounted: # -### The Edit Button -#@export var _edit_button: Button + # ### The PanelTypeOption menu #@export var _panel_type_option: PanelContainer diff --git a/panels/UICore/UICore.tscn b/panels/UICore/UICore.tscn index 0a5946a8..eab8e0c1 100644 --- a/panels/UICore/UICore.tscn +++ b/panels/UICore/UICore.tscn @@ -102,7 +102,7 @@ show_settings = true layout_mode = 2 size_flags_vertical = 3 -[node name="UICorePrimarySideBar" type="PanelContainer" parent="VBoxContainer/HBoxContainer" node_paths=PackedStringArray("_tab_button_container", "_menu_button", "_tab_control_container", "_overlay_container", "_tab_button_scroll", "_ui_core")] +[node name="UICorePrimarySideBar" type="PanelContainer" parent="VBoxContainer/HBoxContainer" node_paths=PackedStringArray("_tab_button_container", "_menu_button", "_tab_control_container", "_overlay_container", "_tab_button_scroll", "_edit_button", "_ui_core")] custom_minimum_size = Vector2(64, 0) layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_aoeir") @@ -112,6 +112,7 @@ _menu_button = NodePath("VBoxContainer/Menu") _tab_control_container = NodePath("../MainContent/HSplitContainer/VSplitContainer/TabControlContainer") _overlay_container = NodePath("../MainContent/OverlayContainer") _tab_button_scroll = NodePath("VBoxContainer/ScrollContainer") +_edit_button = NodePath("VBoxContainer/Edit") _ui_core = NodePath("../../..") [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer/UICorePrimarySideBar"] From b98e21e2cd76234b41efd8da350ce0cc8ee3d940 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 29 Dec 2025 03:28:32 +1300 Subject: [PATCH 5/6] Disabled buttons that are not connected to actions --- panels/UIProgrammer/UIProgrammer.tscn | 3 --- panels/UIVirtualFixtures/UIVirtualFixtures.tscn | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/panels/UIProgrammer/UIProgrammer.tscn b/panels/UIProgrammer/UIProgrammer.tscn index a7a2abbf..7aa4c3f1 100644 --- a/panels/UIProgrammer/UIProgrammer.tscn +++ b/panels/UIProgrammer/UIProgrammer.tscn @@ -153,9 +153,6 @@ popup/item_1/id = 1 layout_mode = 2 icon = ExtResource("6_xrr4a") -[node name="EditControls" parent="VBoxContainer/PanelMenuBar/HBoxContainer" index="2"] -show_settings = true - [node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"] layout_mode = 2 size_flags_vertical = 3 diff --git a/panels/UIVirtualFixtures/UIVirtualFixtures.tscn b/panels/UIVirtualFixtures/UIVirtualFixtures.tscn index bc816301..1f051f61 100644 --- a/panels/UIVirtualFixtures/UIVirtualFixtures.tscn +++ b/panels/UIVirtualFixtures/UIVirtualFixtures.tscn @@ -174,6 +174,7 @@ icon = ExtResource("8_7f0w5") [node name="ZoomAll" type="Button" parent="TitleBar/HBoxContainer/ScrollContainer/HBoxContainer/Zoom Controls/HBoxContainer"] layout_mode = 2 tooltip_text = "Center Zoom" +disabled = true icon = ExtResource("9_fhyt7") [node name="ZoomOut" type="Button" parent="TitleBar/HBoxContainer/ScrollContainer/HBoxContainer/Zoom Controls/HBoxContainer"] From 3955646dab0d5e0b4bd4aa60763224281d5364a8 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 29 Dec 2025 21:14:44 +1300 Subject: [PATCH 6/6] Fixed name in --- .gitmodules | 0 export_presets.cfg | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29b..00000000 diff --git a/export_presets.cfg b/export_presets.cfg index 86205a0c..6d2e015f 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -337,7 +337,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="Export/Spectrum.x86_64.linux.v1.0.0.beta.3.x86_64" +export_path="Export/SpectrumClient.x86_64.linux.v1.0.0.beta.3.x86_64" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters=""