Fix in-game options menu

This commit is contained in:
OleSTEEP 2024-01-09 01:24:45 +03:00
parent 0d335b1786
commit bc89b1f1ff
2 changed files with 9 additions and 13 deletions

View file

@ -249,23 +249,19 @@ Window_OmoMenuOptionsGeneral.prototype.processOptionCommand = function() {
// Set Config Manager Screen Resolution // Set Config Manager Screen Resolution
ConfigManager.screenResolution = data.index; ConfigManager.screenResolution = data.index;
break; break;
case 1: // Fullscreen case 1:
// Set config manager Full screen state ConfigManager.gamepadTips = data.index === 0 ? false : true;
ConfigManager.fullScreen = data.index === 0 ? true : false; console.log(ConfigManager.gamepadTips);
this._processDelay = 20;
break;
case 2:
ConfigManager.gamepadTips = data.index === 0 ? true : false;
if(SceneManager._scene instanceof Scene_OmoriTitleScreen) { if(SceneManager._scene instanceof Scene_OmoriTitleScreen) {
SceneManager._scene.refreshCommandHints(); // Refresh command title hints; SceneManager._scene.refreshCommandHints(); // Refresh command title hints;
} }
break; break;
case 3: ConfigManager.textSkip = data.index === 0 ? true : false; break; case 2: ConfigManager.textSkip = data.index === 0 ? true : false; break;
case 4: ConfigManager.battleLogSpeed = data.index; ;break; case 3: ConfigManager.battleLogSpeed = data.index; ;break;
case 5: ConfigManager.alwaysDash = data.index === 0 ? true : false ;break; case 4: ConfigManager.alwaysDash = data.index === 0 ? true : false ;break;
// OMORI RUS mod specific: // OMORI RUS mod specific:
case 6: ConfigManager.rusCoverInBadEnding = data.index === 0 ? true : false; break; case 5: ConfigManager.rusCoverInBadEnding = data.index === 0 ? true : false; break;
}; };
}; };

View file

@ -9,7 +9,7 @@ function localStorageImplementation() {
return { return {
readSaveFileUTF8(path) { readSaveFileUTF8(path) {
console.log(`Failed to get externalStorage. Using localStorage to read save at ${path}`); console.log(`Failed to get externalStorage. Using localStorage to read save at ${path}`);
return atob(localStorage.getItem(path)); return localStorage.getItem(path);
}, },
saveFileExists(path) { saveFileExists(path) {
@ -19,7 +19,7 @@ function localStorageImplementation() {
writeSaveFileUTF8(path, data) { writeSaveFileUTF8(path, data) {
console.log(`Failed to get externalStorage. Writing ${path} save file to the localStorage`); console.log(`Failed to get externalStorage. Writing ${path} save file to the localStorage`);
localStorage.setItem(path, btoa(data)); localStorage.setItem(path, data);
} }
}; };
} }