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