Merge pull request #543 from GriffinRichards/options

Add Project Settings Editor
This commit is contained in:
GriffinR
2023-09-25 10:45:16 -04:00
committed by GitHub
49 changed files with 3034 additions and 442 deletions

View File

@@ -184,7 +184,7 @@ bool ScriptUtility::getSmartPathsEnabled() {
}
QList<QString> ScriptUtility::getCustomScripts() {
return userConfig.getCustomScripts();
return userConfig.getCustomScriptPaths();
}
QList<int> ScriptUtility::getMetatileLayerOrder() {

View File

@@ -36,8 +36,11 @@ Scripting::Scripting(MainWindow *mainWindow) {
this->mainWindow = mainWindow;
this->engine = new QJSEngine(mainWindow);
this->engine->installExtensions(QJSEngine::ConsoleExtension);
for (QString script : userConfig.getCustomScripts()) {
this->filepaths.append(script);
const QStringList paths = userConfig.getCustomScriptPaths();
const QList<bool> enabled = userConfig.getCustomScriptsEnabled();
for (int i = 0; i < paths.length(); i++) {
if (enabled.at(i))
this->filepaths.append(paths.at(i));
}
this->loadModules(this->filepaths);
this->scriptUtility = new ScriptUtility(mainWindow);