Beispiel #1
0
        private void HandleBackPressed()
        {
            tempState = SettingsState.Clone(savedState);

            fullscreenBox.Pressed = tempState.fullscreen;

            OnSettingsMenuBackPressed?.Invoke();
        }
Beispiel #2
0
        public static SettingsState Clone(SettingsState other)
        {
            SettingsState newState = new SettingsState();

            newState.fullscreen = other.fullscreen;

            return(newState);
        }
Beispiel #3
0
        public override void _Ready()
        {
            LoadSettings();
            tempState = new SettingsState();

            fullscreenBox = GetNode <CheckBox>(fullScreenBoxPath);
            applyButton   = GetNode <Button>(applyButtonPath);
            backButton    = GetNode <Button>(backButtonPath);

            fullscreenBox.Connect("toggled", this, nameof(HandleFullScreenToggled));
            applyButton.Connect("pressed", this, nameof(HandleApplyPressed));
            backButton.Connect("pressed", this, nameof(HandleBackPressed));
        }
Beispiel #4
0
        private void HandleApplyPressed()
        {
            savedState = SettingsState.Clone(tempState);

            OS.WindowFullscreen = savedState.fullscreen;
        }
Beispiel #5
0
 private void LoadSettings()
 {
     savedState = new SettingsState();
 }