refactor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user