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