コード例 #1
0
        private void HandleBackPressed()
        {
            tempState = SettingsState.Clone(savedState);

            fullscreenBox.Pressed = tempState.fullscreen;

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

            newState.fullscreen = other.fullscreen;

            return(newState);
        }
コード例 #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));
        }
コード例 #4
0
        private void HandleApplyPressed()
        {
            savedState = SettingsState.Clone(tempState);

            OS.WindowFullscreen = savedState.fullscreen;
        }
コード例 #5
0
 private void LoadSettings()
 {
     savedState = new SettingsState();
 }