{"paths_addGamePath":[{"opcode":"SET_COMMENT","data":{"text":"This will add a specific path from game path list"}},{"opcode":"LOCK_INPUT"},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.design.removeErrorClass();"}},{"opcode":"SET_COMMENT","data":{"text":"Set current cursor position and current menu"}},{"opcode":"SET_VAR","data":{"target":"temp.cIndex","value":"design.input.currentIndex"}},{"opcode":"SET_COMMENT","data":{"text":"Save all settings"}},{"opcode":"SAVE_SETTINGS"},{"opcode":"CALL_MSGSYS","data":{"msgName":"general_loadingGameList","showBgIcon":true}},{"opcode":"WAIT","data":{"time":100}},{"opcode":"SET_COMMENT","data":{"text":"Generate a new game list"}},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.gameList.make();"}},{"opcode":"END_MSGSYS"},{"opcode":"SET_COMMENT","data":{"text":"Open settings menu again and open \"paths\" menu"}},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.design.settingsMenu.open();"}},{"opcode":"SET_COMMENT","data":{"text":"Clear temp var, focus cursor, release input and then end script"}},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.design.settingsMenu.renderMenu('paths', void 0, APP.temp.cIndex);"}},{"opcode":"SET_VAR","data":{"target":"design.input.currentIndex","value":"2","isFromMainObject":false}},{"opcode":"CLEAR_TEMP"},{"opcode":"RELEASE_INPUT"},{"opcode":"END_LIST"}],"path_removeGamePath":[{"opcode":"SET_COMMENT","data":{"text":"This will remove a specific path from game path list"}},{"opcode":"LOCK_INPUT"},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.design.removeErrorClass();"}},{"opcode":"SET_COMMENT","data":{"text":"Remove selected path from folder list, save settings and call msgsys"}},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.settings.data.gamePaths.splice(APP.temp.selectedPath, 1);"}},{"opcode":"SAVE_SETTINGS"},{"opcode":"CALL_MSGSYS","data":{"msgName":"general_loadingGameList","showBgIcon":true}},{"opcode":"SET_COMMENT","data":{"text":"Generate a new game list and check if previous game exists on new list. If not, reset background and select first game on list"}},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.gameList.make(function(){void 0===APP.gameList.list[APP.gameList.selectedGame]&&0!==Object.keys(APP.gameList.list).length?(APP.design.input.gListIndexPos=0,APP.gameList.selectedGame=Object.keys(APP.gameList.list)[0],TMS.css(\"APP_CANVAS_BG\",{\"background-image\":'url(\"'+APP.gameList.list[APP.gameList.selectedGame].img_background+'\")'})):(APP.gameList.selectedGame=\"\",APP.design.input.gListIndexPos=0,TMS.css(\"APP_CANVAS_BG\",{\"background-image\":\"none\"}))});"}},{"opcode":"SET_COMMENT","data":{"text":"Open settings menu again, check if next cursor position is out of bounds and display paths menu"}},{"opcode":"END_MSGSYS"},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.design.settingsMenu.open(function(){APP.temp.cursorIndex>APP.design.input.currentListLength-1&&(APP.temp.cursorIndex=APP.design.input.currentListLength-1),APP.design.settingsMenu.renderMenu(\"paths\",void 0,APP.temp.cursorIndex)});"}},{"opcode":"END_LIST"}],"path_selectEmuPath":[{"opcode":"SET_COMMENT","data":{"text":"Lock input and save cursor index"}},{"opcode":"LOCK_INPUT"},{"opcode":"SET_VAR","data":{"target":"temp.cIndex","value":"design.input.currentIndex"}},{"opcode":"SET_COMMENT","data":{"text":"Apply new path"}},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.settings.loadHackList(APP.temp.newPath,function(P){0===P&&APP.settings.apply({fpPS4_Path:APP.temp.newPath})});"}},{"opcode":"SET_COMMENT","data":{"text":"Render settings menu again"}},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.design.settingsMenu.open();"}},{"opcode":"EXECUTE_PROMISE","data":{"execFn":"APP.design.settingsMenu.renderMenu('paths', void 0, APP.temp.cIndex);"}},{"opcode":"SET_COMMENT","data":{"text":"Clear temp and release input"}},{"opcode":"CLEAR_TEMP"},{"opcode":"RELEASE_INPUT"},{"opcode":"END_LIST"}]}