Fix options menu displaying

This commit is contained in:
OleSTEEP 2024-01-03 02:59:58 +03:00
parent e92bb2e7eb
commit 30e8bef4a1

View file

@ -413,7 +413,7 @@ Scene_OmoriTitleScreen.prototype.createTitleCommands = function () {
Scene_OmoriTitleScreen.prototype.createOptionWindowsContainer = function () {
// Create Help Window Container
this._optionsWindowsContainer = new Sprite();
this._optionsWindowsContainer.x = 10;
this._optionsWindowsContainer.x = 0;
this._optionsWindowsContainer.y = -406;
this._optionsWindowsContainer.opacity = 255;
this.addChild(this._optionsWindowsContainer);
@ -424,7 +424,7 @@ Scene_OmoriTitleScreen.prototype.createOptionWindowsContainer = function () {
Scene_OmoriTitleScreen.prototype.createHelpWindow = function () {
// Create Help Window
this._helpWindow = new Window_OmoMenuOptionsHelp();
this._helpWindow.x = 0;
this._helpWindow.x = 10;
this._helpWindow.y = Graphics.height - this._helpWindow.height - 10;
this._optionsWindowsContainer.addChild(this._helpWindow);
};
@ -434,6 +434,8 @@ Scene_OmoriTitleScreen.prototype.createHelpWindow = function () {
Scene_OmoriTitleScreen.prototype.createOptionCategoriesWindow = function () {
// Create Options Categories Window
this._optionCategoriesWindow = new Window_OmoMenuOptionsCategory();
this._optionCategoriesWindow.x = 10;
this._optionCategoriesWindow.y = 37;
this._optionCategoriesWindow.deactivate();
this._optionCategoriesWindow.setHandler('ok', this.onCategoryOk.bind(this));
@ -460,6 +462,8 @@ Scene_OmoriTitleScreen.prototype.createOptionCategoriesWindow = function () {
Scene_OmoriTitleScreen.prototype.createGeneralOptionsWindow = function () {
// Create General Options Window
this._generalOptionsWindow = new Window_OmoMenuOptionsGeneral();
this._generalOptionsWindow.x = 10;
this._generalOptionsWindow.y = 37;
this._generalOptionsWindow.setHandler('cancel', this.onOptionWindowCancel.bind(this));
this._generalOptionsWindow.deactivate()
// Set Help Window Position
@ -474,6 +478,8 @@ Scene_OmoriTitleScreen.prototype.createGeneralOptionsWindow = function () {
Scene_OmoriTitleScreen.prototype.createAudioOptionsWindow = function () {
// Create Audio Options Window
this._audioOptionsWindow = new Window_OmoMenuOptionsAudio();
this._audioOptionsWindow.x = 10;
this._audioOptionsWindow.y = 37;
this._audioOptionsWindow.setHandler('cancel', this.onOptionWindowCancel.bind(this));
this._audioOptionsWindow.visible = false;
this._optionsWindowsContainer.addChild(this._audioOptionsWindow);
@ -484,6 +490,8 @@ Scene_OmoriTitleScreen.prototype.createAudioOptionsWindow = function () {
Scene_OmoriTitleScreen.prototype.createControllerOptionsWindow = function () {
// Create Control Options Window
this._controlOptionsWindow = new Window_OmoMenuOptionsControls();
this._controlOptionsWindow.x = 10;
this._controlOptionsWindow.y = 37;
this._controlOptionsWindow.setHandler('cancel', this.onOptionWindowCancel.bind(this));
this._controlOptionsWindow.visible = false;
this._optionsWindowsContainer.addChild(this._controlOptionsWindow);
@ -494,6 +502,8 @@ Scene_OmoriTitleScreen.prototype.createControllerOptionsWindow = function () {
Scene_OmoriTitleScreen.prototype.createSystemOptionsWindow = function () {
// Create System Option Window
this._systemOptionsWindow = new Window_OmoMenuOptionsSystem();
this._systemOptionsWindow.x = 10;
this._systemOptionsWindow.y = 37;
this._systemOptionsWindow.setHandler('restoreConfig', () => {
ConfigManager.restoreDefaultConfig();
this._controlOptionsWindow.makeOptionsList()
@ -996,7 +1006,7 @@ Scene_OmoriTitleScreen.prototype.commandOptions = function () {
// Set Duration
var duration = 35;
var obj = this._optionsWindowsContainer;
var data = { obj: obj, properties: ['y', 'opacity'], from: { y: obj.y, opacity: obj.opacity }, to: { y: 37, opacity: 255 }, durations: { y: duration, opacity: duration } }
var data = { obj: obj, properties: ['y', 'opacity'], from: { y: obj.y, opacity: obj.opacity }, to: { y: 0, opacity: 255 }, durations: { y: duration, opacity: duration } }
data.easing = Object_Movement.easeOutCirc;
this.move.startMove(data);
}.bind(this))