This commit is contained in:
Matt Parker
2026-01-07 00:27:01 +10:00
parent e98a03fe6e
commit 3d2317c6d4

View File

@@ -14,21 +14,11 @@ public partial class SettingsWindow : Window
_debuggerFilePathLineEdit = GetNode<LineEdit>("%DebuggerFilePathLineEdit");
_debuggerUseSharpDbgCheckButton = GetNode<CheckButton>("%DebuggerUseSharpDbgCheckButton");
_uiScaleSpinBox.ValueChanged += OnUiScaleSpinBoxValueChanged;
_debuggerFilePathLineEdit.TextChanged += DebuggerFilePathChanged;
_debuggerUseSharpDbgCheckButton.Toggled += OnDebuggerUseSharpDbgCheckButtonOnToggled;
_debuggerFilePathLineEdit.TextChanged += OnDebuggerFilePathChanged;
_debuggerUseSharpDbgCheckButton.Toggled += OnDebuggerUseSharpDbgToggled;
AboutToPopup += OnAboutToPopup;
}
private void OnDebuggerUseSharpDbgCheckButtonOnToggled(bool pressed)
{
Singletons.AppState.IdeSettings.DebuggerUseSharpDbg = pressed;
}
private void DebuggerFilePathChanged(string newText)
{
Singletons.AppState.IdeSettings.DebuggerExecutablePath = newText;
}
private void OnAboutToPopup()
{
_uiScaleSpinBox.Value = Singletons.AppState.IdeSettings.UiScale;
@@ -44,4 +34,14 @@ public partial class SettingsWindow : Window
GetTree().GetRoot().ContentScaleFactor = valueFloat;
PopupCenteredRatio(0.5f); // Re-size the window after scaling
}
private void OnDebuggerFilePathChanged(string newText)
{
Singletons.AppState.IdeSettings.DebuggerExecutablePath = newText;
}
private void OnDebuggerUseSharpDbgToggled(bool pressed)
{
Singletons.AppState.IdeSettings.DebuggerUseSharpDbg = pressed;
}
}