Skip to content

Commit

Permalink
auto run on start
Browse files Browse the repository at this point in the history
  • Loading branch information
moonshadow565 committed Aug 27, 2022
1 parent 8d8297c commit d425681
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/qml/CSLOLDialogSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Dialog {
property alias themePrimaryColor: themePrimaryColorBox.currentIndex
property alias themeAccentColor: themeAccentColorBox.currentIndex
property alias suppressInstallConflicts: suppressInstallConflictsCheck.checked
property alias enableAutoRun: enableAutoRunCheck.checked

property var colors_LIST: [
"Red",
Expand Down Expand Up @@ -107,6 +108,12 @@ Dialog {
checked: false
Layout.fillWidth: true
}
Switch {
id: enableAutoRunCheck
text: qsTr("Auto Run on start")
checked: false
Layout.fillWidth: true
}
}
ColumnLayout {
id: settingsThemeTab
Expand Down
5 changes: 4 additions & 1 deletion src/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ApplicationWindow {
property alias ignorebad: cslolDialogSettings.ignorebad
property alias suppressInstallConflicts: cslolDialogSettings.suppressInstallConflicts
property alias disableUpdates: cslolDialogSettings.disableUpdates
property alias enableAutoRun: cslolDialogSettings.enableAutoRun
property alias themeDarkMode: cslolDialogSettings.themeDarkMode
property alias themePrimaryColor: cslolDialogSettings.themePrimaryColor
property alias themeAccentColor: cslolDialogSettings.themeAccentColor
Expand Down Expand Up @@ -270,7 +271,9 @@ ApplicationWindow {
for(let fileName in mods) {
cslolModsView.addMod(fileName, mods[fileName], fileName in profileMods)
}
checkGamePath()
if(checkGamePath() && settings.enableAutoRun) {
cslolToolBar.saveProfileAndRun(true)
}
}
onModDeleted: {}
onInstalledMod: function(fileName, infoData) {
Expand Down

0 comments on commit d425681

Please sign in to comment.