VolantisDev / Launchpad

Step up your non-Steam game! Generate Steam-compatible .exe files to effortlessly launch any game through Steam with overlay support.
https://launchpad.games
MIT License
85 stars 3 forks source link

Make sure default launcher theme has a blank default value #330

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago

Make sure default launcher theme has a blank default value

https://github.com/VolantisDev/Launchpad/blob/4d4ce6b6e206df6c0430fce7befb363717687f92/Lib/Launchpad/Gui/Form/SettingsWindow.ahk#L273


    OnThemeNameChange(ctl, info) {
        this.guiObj.Submit(false)
        this.app.Config["theme_name"] := this.availableThemes[ctl.Value]
        this.app.Service("ThemeManager").LoadMainTheme()
        this.needsRestart := true
    }

    ; TODO: Make sure default launcher theme has a blank default value
    OnDefaultLauncherThemeChange(ctl, info) {
        this.guiObj.Submit(false)
        this.app.Config["default_launcher_theme"] := this.availableThemes[ctl.Value]
    }

    OnPlatformsViewModeChange(ctl, info) {
        this.guiObj.Submit(false)
        this.app.Config["platforms_view_mode"] := this.listViewModes[ctl.Value]
    }

    OnLauncherDoubleClickActionChange(ctl, info) {
        this.guiObj.Submit(false)
        this.app.Config["launcher_double_click_action"] := this.doubleClickActions[ctl.Value]
    }

    OnBackupsViewModeChange(ctl, info) {
        this.guiObj.Submit(false)
        this.app.Config["backups_view_mode"] := this.listViewModes[ctl.Value]
    }

    OnLoggingLevelChange(ctl, info) {
        this.guiObj.Submit(false)
        this.app.Config["logging_level"] := ctl.Text
    }

    OnBackupsToKeepChange(ctl, info) {
        this.guiObj.Submit(false)
        this.app.Config["backups_to_keep"] := ctl.Text
    }

    ProcessResult(result, submittedData := "") {
        ; TODO: Add temporary storage and a Cancel button to the Settings window
        this.app.Config.SaveConfig()

        if (this.needsRestart) {
            response := this.app.Service("GuiManager").Dialog("DialogBox", "Restart " . this.app.appName . "?", "One or more settings that have been changed require restarting " . this.app.appName . " to fully take effect.`n`nWould you like to restart " . this.app.appName . " now?")

e5ec9d1e19cfdb613f01e6ec91dd3d1a7f44e31f