From a855e52261625d44d0d7b0d96dc74fb82cc45c2a Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Fri, 12 Dec 2025 18:45:01 +1000 Subject: [PATCH] Add debugger file path to settings --- .../Features/Settings/SettingsWindow.cs | 9 ++++ .../Features/Settings/SettingsWindow.tscn | 42 +++++++++++++++++-- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/src/SharpIDE.Godot/Features/Settings/SettingsWindow.cs b/src/SharpIDE.Godot/Features/Settings/SettingsWindow.cs index b0db5f8..ea7912f 100644 --- a/src/SharpIDE.Godot/Features/Settings/SettingsWindow.cs +++ b/src/SharpIDE.Godot/Features/Settings/SettingsWindow.cs @@ -5,17 +5,26 @@ namespace SharpIDE.Godot.Features.Settings; public partial class SettingsWindow : Window { private SpinBox _uiScaleSpinBox = null!; + private LineEdit _debuggerFilePathLineEdit = null!; public override void _Ready() { CloseRequested += Hide; _uiScaleSpinBox = GetNode("%UiScaleSpinBox"); + _debuggerFilePathLineEdit = GetNode("%DebuggerFilePathLineEdit"); _uiScaleSpinBox.ValueChanged += OnUiScaleSpinBoxValueChanged; + _debuggerFilePathLineEdit.TextChanged += DebuggerFilePathChanged; AboutToPopup += OnAboutToPopup; } + private void DebuggerFilePathChanged(string newText) + { + Singletons.AppState.IdeSettings.DebuggerExecutablePath = newText; + } + private void OnAboutToPopup() { _uiScaleSpinBox.Value = Singletons.AppState.IdeSettings.UiScale; + _debuggerFilePathLineEdit.Text = Singletons.AppState.IdeSettings.DebuggerExecutablePath; } private void OnUiScaleSpinBoxValueChanged(double value) diff --git a/src/SharpIDE.Godot/Features/Settings/SettingsWindow.tscn b/src/SharpIDE.Godot/Features/Settings/SettingsWindow.tscn index f5a152b..0b5e97f 100644 --- a/src/SharpIDE.Godot/Features/Settings/SettingsWindow.tscn +++ b/src/SharpIDE.Godot/Features/Settings/SettingsWindow.tscn @@ -44,15 +44,20 @@ theme_override_constants/margin_bottom = 5 [node name="VBoxContainer2" type="VBoxContainer" parent="HSplitContainer/PanelContainer/MarginContainer"] layout_mode = 2 +theme_override_constants/separation = 12 -[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2"] +[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_constants/separation = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer"] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/HBoxContainer"] +[node name="Label" type="Label" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer/HBoxContainer"] layout_mode = 2 text = "UI Scale" -[node name="UiScaleSpinBox" type="SpinBox" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/HBoxContainer"] +[node name="UiScaleSpinBox" type="SpinBox" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer/HBoxContainer"] unique_name_in_owner = true layout_mode = 2 min_value = 0.5 @@ -62,7 +67,36 @@ value = 1.0 update_on_text_changed = true custom_arrow_step = 0.1 -[node name="Label" type="Label" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2"] +[node name="Label" type="Label" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer"] layout_mode = 2 theme_override_colors/font_color = Color(0.5686275, 0.5686275, 0.5686275, 1) text = "Experimental. Non-integer scales will be blurry." + +[node name="VBoxContainer2" type="VBoxContainer" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_constants/separation = 2 + +[node name="HBoxContainer2" type="HBoxContainer" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer2"] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer2/HBoxContainer2"] +layout_mode = 2 +text = "Debugger File Path" + +[node name="DebuggerFilePathLineEdit" type="LineEdit" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer2/HBoxContainer2"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer2"] +layout_mode = 2 + +[node name="Label2" type="Label" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer2/HBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.5686275, 0.5686275, 0.5686275, 1) +text = "Experimental. Get netcoredbg from" + +[node name="LinkButton" type="LinkButton" parent="HSplitContainer/PanelContainer/MarginContainer/VBoxContainer2/VBoxContainer2/HBoxContainer"] +layout_mode = 2 +text = "here" +uri = "https://github.com/Samsung/netcoredbg/releases"