Add debugger file path to settings
This commit is contained in:
@@ -5,17 +5,26 @@ namespace SharpIDE.Godot.Features.Settings;
|
|||||||
public partial class SettingsWindow : Window
|
public partial class SettingsWindow : Window
|
||||||
{
|
{
|
||||||
private SpinBox _uiScaleSpinBox = null!;
|
private SpinBox _uiScaleSpinBox = null!;
|
||||||
|
private LineEdit _debuggerFilePathLineEdit = null!;
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
CloseRequested += Hide;
|
CloseRequested += Hide;
|
||||||
_uiScaleSpinBox = GetNode<SpinBox>("%UiScaleSpinBox");
|
_uiScaleSpinBox = GetNode<SpinBox>("%UiScaleSpinBox");
|
||||||
|
_debuggerFilePathLineEdit = GetNode<LineEdit>("%DebuggerFilePathLineEdit");
|
||||||
_uiScaleSpinBox.ValueChanged += OnUiScaleSpinBoxValueChanged;
|
_uiScaleSpinBox.ValueChanged += OnUiScaleSpinBoxValueChanged;
|
||||||
|
_debuggerFilePathLineEdit.TextChanged += DebuggerFilePathChanged;
|
||||||
AboutToPopup += OnAboutToPopup;
|
AboutToPopup += OnAboutToPopup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DebuggerFilePathChanged(string newText)
|
||||||
|
{
|
||||||
|
Singletons.AppState.IdeSettings.DebuggerExecutablePath = newText;
|
||||||
|
}
|
||||||
|
|
||||||
private void OnAboutToPopup()
|
private void OnAboutToPopup()
|
||||||
{
|
{
|
||||||
_uiScaleSpinBox.Value = Singletons.AppState.IdeSettings.UiScale;
|
_uiScaleSpinBox.Value = Singletons.AppState.IdeSettings.UiScale;
|
||||||
|
_debuggerFilePathLineEdit.Text = Singletons.AppState.IdeSettings.DebuggerExecutablePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUiScaleSpinBoxValueChanged(double value)
|
private void OnUiScaleSpinBoxValueChanged(double value)
|
||||||
|
|||||||
@@ -44,15 +44,20 @@ theme_override_constants/margin_bottom = 5
|
|||||||
|
|
||||||
[node name="VBoxContainer2" type="VBoxContainer" parent="HSplitContainer/PanelContainer/MarginContainer"]
|
[node name="VBoxContainer2" type="VBoxContainer" parent="HSplitContainer/PanelContainer/MarginContainer"]
|
||||||
layout_mode = 2
|
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
|
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
|
layout_mode = 2
|
||||||
text = "UI Scale"
|
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
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
min_value = 0.5
|
min_value = 0.5
|
||||||
@@ -62,7 +67,36 @@ value = 1.0
|
|||||||
update_on_text_changed = true
|
update_on_text_changed = true
|
||||||
custom_arrow_step = 0.1
|
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
|
layout_mode = 2
|
||||||
theme_override_colors/font_color = Color(0.5686275, 0.5686275, 0.5686275, 1)
|
theme_override_colors/font_color = Color(0.5686275, 0.5686275, 0.5686275, 1)
|
||||||
text = "Experimental. Non-integer scales will be blurry."
|
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user