From 8fed581b528bd2e5dc93480eeb46bffe18a17179 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Fri, 29 Aug 2025 19:57:01 +1000 Subject: [PATCH] add sub tab v1 --- .../Features/Debug_/DebugPanel.cs | 2 +- .../Debug_/DebugPanelTab/DebugPanelTab.tscn | 10 ++--- .../SubTabs/ThreadsVariablesSubTab.tscn | 43 +++++++++++++++++++ 3 files changed, 47 insertions(+), 8 deletions(-) diff --git a/src/SharpIDE.Godot/Features/Debug_/DebugPanel.cs b/src/SharpIDE.Godot/Features/Debug_/DebugPanel.cs index 0ccd0d1..f4d4713 100644 --- a/src/SharpIDE.Godot/Features/Debug_/DebugPanel.cs +++ b/src/SharpIDE.Godot/Features/Debug_/DebugPanel.cs @@ -13,7 +13,7 @@ public partial class DebugPanel : Control [Export] public Texture2D RunningIcon { get; set; } = null!; - private PackedScene _debugPanelTabScene = GD.Load("res://Features/Debug_/DebugPanelTab.tscn"); + private PackedScene _debugPanelTabScene = GD.Load("res://Features/Debug_/DebugPanelTab/DebugPanelTab.tscn"); public override void _Ready() { if (RunningIcon is null) throw new Exception("RunningIcon is null in DebugPanel"); diff --git a/src/SharpIDE.Godot/Features/Debug_/DebugPanelTab/DebugPanelTab.tscn b/src/SharpIDE.Godot/Features/Debug_/DebugPanelTab/DebugPanelTab.tscn index a76b579..c54de46 100644 --- a/src/SharpIDE.Godot/Features/Debug_/DebugPanelTab/DebugPanelTab.tscn +++ b/src/SharpIDE.Godot/Features/Debug_/DebugPanelTab/DebugPanelTab.tscn @@ -1,18 +1,14 @@ -[gd_scene load_steps=4 format=3 uid="uid://d4d0umsglu2ex"] +[gd_scene load_steps=3 format=3 uid="uid://d4d0umsglu2ex"] [ext_resource type="Script" uid="uid://b6gq81odfn8ok" path="res://Features/Debug_/DebugPanelTab/DebugPanelTab.cs" id="1_yinwn"] [ext_resource type="PackedScene" uid="uid://bdu08nd7si641" path="res://Features/Debug_/DebugPanelTab/SubTabs/ThreadsVariablesSubTab.tscn" id="2_0jpwf"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dx3i6"] -bg_color = Color(0.129589, 0.120703, 0.112057, 1) - [node name="DebugPanelTab" type="Panel"] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_styles/panel = SubResource("StyleBoxFlat_dx3i6") script = ExtResource("1_yinwn") [node name="TabContainer" type="TabContainer" parent="."] @@ -22,10 +18,9 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -current_tab = 1 +current_tab = 0 [node name="Threads & Variables" type="Control" parent="TabContainer"] -visible = false layout_mode = 2 metadata/_tab_index = 0 @@ -33,6 +28,7 @@ metadata/_tab_index = 0 layout_mode = 1 [node name="Console" type="Control" parent="TabContainer"] +visible = false layout_mode = 2 metadata/_tab_index = 1 diff --git a/src/SharpIDE.Godot/Features/Debug_/DebugPanelTab/SubTabs/ThreadsVariablesSubTab.tscn b/src/SharpIDE.Godot/Features/Debug_/DebugPanelTab/SubTabs/ThreadsVariablesSubTab.tscn index d8303f7..9435a9b 100644 --- a/src/SharpIDE.Godot/Features/Debug_/DebugPanelTab/SubTabs/ThreadsVariablesSubTab.tscn +++ b/src/SharpIDE.Godot/Features/Debug_/DebugPanelTab/SubTabs/ThreadsVariablesSubTab.tscn @@ -7,3 +7,46 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 + +[node name="HSplitContainer" type="HSplitContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +split_offset = 775 + +[node name="HSplitContainer" type="HSplitContainer" parent="HSplitContainer"] +layout_mode = 2 +split_offset = 370 + +[node name="Panel" type="Panel" parent="HSplitContainer/HSplitContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/HSplitContainer/Panel"] +layout_mode = 0 +offset_left = 12.0 +offset_right = 52.0 +offset_bottom = 23.0 +text = "A" + +[node name="Panel2" type="Panel" parent="HSplitContainer/HSplitContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/HSplitContainer/Panel2"] +layout_mode = 0 +offset_left = 12.0 +offset_right = 52.0 +offset_bottom = 23.0 +text = "B" + +[node name="Panel3" type="Panel" parent="HSplitContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/Panel3"] +layout_mode = 0 +offset_left = 12.0 +offset_right = 52.0 +offset_bottom = 23.0 +text = "C"