PIXI Controls: Refresh option window on restore defaults
This commit is contained in:
parent
cfc4fd6b3e
commit
8dc514f6cc
2 changed files with 104 additions and 0 deletions
|
@ -1001,6 +1001,58 @@ Window_OmoMenuOptionsONSControls.prototype.add = function () {
|
||||||
this.createCommandWindow();
|
this.createCommandWindow();
|
||||||
this.createExitPromptWindow();
|
this.createExitPromptWindow();
|
||||||
};
|
};
|
||||||
|
Scene_OmoMenuOptions.prototype.createSystemOptionsWindow = function () {
|
||||||
|
// Create System Option Window
|
||||||
|
this._systemOptionsWindow = new Window_OmoMenuOptionsSystem();
|
||||||
|
this._systemOptionsWindow.x = 10;
|
||||||
|
this._systemOptionsWindow.y = 10;
|
||||||
|
this._systemOptionsWindow.setHandler('cancel', this.onOptionWindowCancel.bind(this));
|
||||||
|
this._systemOptionsWindow.setHandler('restoreConfig', () => {
|
||||||
|
ConfigManager.restoreDefaultConfig();
|
||||||
|
this._controlOptionsWindow.makeOptionsList()
|
||||||
|
this._generalOptionsWindow.makeOptionsList();
|
||||||
|
this._audioOptionsWindow.makeOptionsList();
|
||||||
|
this._onscontrolsOptionsWindow.makeOptionsList();
|
||||||
|
|
||||||
|
this._controlOptionsWindow.refresh()
|
||||||
|
this._controlOptionsWindow.select(0);
|
||||||
|
this._generalOptionsWindow.refresh();
|
||||||
|
this._generalOptionsWindow.select(0);
|
||||||
|
this._audioOptionsWindow.refresh();
|
||||||
|
this._onscontrolsOptionsWindow.refresh();
|
||||||
|
this._systemOptionsWindow.refresh();
|
||||||
|
this._systemOptionsWindow.activate();
|
||||||
|
Input.clear();
|
||||||
|
});
|
||||||
|
this._systemOptionsWindow.setHandler('load', this.goToLoad.bind(this));
|
||||||
|
this._systemOptionsWindow.setHandler('toTitleScreen', this.startExitPrompt.bind(this, 1));
|
||||||
|
this._systemOptionsWindow.setHandler('exit', this.startExitPrompt.bind(this, 0));
|
||||||
|
this.addChild(this._systemOptionsWindow);
|
||||||
|
};
|
||||||
|
Scene_OmoriTitleScreen.prototype.createSystemOptionsWindow = function () {
|
||||||
|
// Create System Option Window
|
||||||
|
this._systemOptionsWindow = new Window_OmoMenuOptionsSystem();
|
||||||
|
this._systemOptionsWindow.setHandler('restoreConfig', () => {
|
||||||
|
ConfigManager.restoreDefaultConfig();
|
||||||
|
this._controlOptionsWindow.makeOptionsList()
|
||||||
|
this._generalOptionsWindow.makeOptionsList();
|
||||||
|
this._audioOptionsWindow.makeOptionsList();
|
||||||
|
this._onscontrolsOptionsWindow.makeOptionsList();
|
||||||
|
|
||||||
|
this._controlOptionsWindow.refresh()
|
||||||
|
this._controlOptionsWindow.select(0);
|
||||||
|
this._generalOptionsWindow.refresh();
|
||||||
|
this._generalOptionsWindow.select(0);
|
||||||
|
this._audioOptionsWindow.refresh();
|
||||||
|
this._onscontrolsOptionsWindow.refresh();
|
||||||
|
this._systemOptionsWindow.refresh();
|
||||||
|
this._systemOptionsWindow.activate();
|
||||||
|
Input.clear();
|
||||||
|
});
|
||||||
|
this._systemOptionsWindow.setHandler('cancel', this.onOptionWindowCancel.bind(this));
|
||||||
|
this._systemOptionsWindow.setHandler('exit', this.startExitPrompt.bind(this));
|
||||||
|
this._optionsWindowsContainer.addChild(this._systemOptionsWindow);
|
||||||
|
};
|
||||||
Window_OmoMenuOptionsCategory.prototype.standardPadding = function () { return 7; }
|
Window_OmoMenuOptionsCategory.prototype.standardPadding = function () { return 7; }
|
||||||
Window_OmoMenuOptionsCategory.prototype.maxCols = function () { return 5; };
|
Window_OmoMenuOptionsCategory.prototype.maxCols = function () { return 5; };
|
||||||
Window_OmoMenuOptionsCategory.prototype.makeCommandList = function () {
|
Window_OmoMenuOptionsCategory.prototype.makeCommandList = function () {
|
||||||
|
|
|
@ -1001,6 +1001,58 @@ Window_OmoMenuOptionsONSControls.prototype.add = function () {
|
||||||
this.createCommandWindow();
|
this.createCommandWindow();
|
||||||
this.createExitPromptWindow();
|
this.createExitPromptWindow();
|
||||||
};
|
};
|
||||||
|
Scene_OmoMenuOptions.prototype.createSystemOptionsWindow = function () {
|
||||||
|
// Create System Option Window
|
||||||
|
this._systemOptionsWindow = new Window_OmoMenuOptionsSystem();
|
||||||
|
this._systemOptionsWindow.x = 10;
|
||||||
|
this._systemOptionsWindow.y = 10;
|
||||||
|
this._systemOptionsWindow.setHandler('cancel', this.onOptionWindowCancel.bind(this));
|
||||||
|
this._systemOptionsWindow.setHandler('restoreConfig', () => {
|
||||||
|
ConfigManager.restoreDefaultConfig();
|
||||||
|
this._controlOptionsWindow.makeOptionsList()
|
||||||
|
this._generalOptionsWindow.makeOptionsList();
|
||||||
|
this._audioOptionsWindow.makeOptionsList();
|
||||||
|
this._onscontrolsOptionsWindow.makeOptionsList();
|
||||||
|
|
||||||
|
this._controlOptionsWindow.refresh()
|
||||||
|
this._controlOptionsWindow.select(0);
|
||||||
|
this._generalOptionsWindow.refresh();
|
||||||
|
this._generalOptionsWindow.select(0);
|
||||||
|
this._audioOptionsWindow.refresh();
|
||||||
|
this._onscontrolsOptionsWindow.refresh();
|
||||||
|
this._systemOptionsWindow.refresh();
|
||||||
|
this._systemOptionsWindow.activate();
|
||||||
|
Input.clear();
|
||||||
|
});
|
||||||
|
this._systemOptionsWindow.setHandler('load', this.goToLoad.bind(this));
|
||||||
|
this._systemOptionsWindow.setHandler('toTitleScreen', this.startExitPrompt.bind(this, 1));
|
||||||
|
this._systemOptionsWindow.setHandler('exit', this.startExitPrompt.bind(this, 0));
|
||||||
|
this.addChild(this._systemOptionsWindow);
|
||||||
|
};
|
||||||
|
Scene_OmoriTitleScreen.prototype.createSystemOptionsWindow = function () {
|
||||||
|
// Create System Option Window
|
||||||
|
this._systemOptionsWindow = new Window_OmoMenuOptionsSystem();
|
||||||
|
this._systemOptionsWindow.setHandler('restoreConfig', () => {
|
||||||
|
ConfigManager.restoreDefaultConfig();
|
||||||
|
this._controlOptionsWindow.makeOptionsList()
|
||||||
|
this._generalOptionsWindow.makeOptionsList();
|
||||||
|
this._audioOptionsWindow.makeOptionsList();
|
||||||
|
this._onscontrolsOptionsWindow.makeOptionsList();
|
||||||
|
|
||||||
|
this._controlOptionsWindow.refresh()
|
||||||
|
this._controlOptionsWindow.select(0);
|
||||||
|
this._generalOptionsWindow.refresh();
|
||||||
|
this._generalOptionsWindow.select(0);
|
||||||
|
this._audioOptionsWindow.refresh();
|
||||||
|
this._onscontrolsOptionsWindow.refresh();
|
||||||
|
this._systemOptionsWindow.refresh();
|
||||||
|
this._systemOptionsWindow.activate();
|
||||||
|
Input.clear();
|
||||||
|
});
|
||||||
|
this._systemOptionsWindow.setHandler('cancel', this.onOptionWindowCancel.bind(this));
|
||||||
|
this._systemOptionsWindow.setHandler('exit', this.startExitPrompt.bind(this));
|
||||||
|
this._optionsWindowsContainer.addChild(this._systemOptionsWindow);
|
||||||
|
};
|
||||||
Window_OmoMenuOptionsCategory.prototype.standardPadding = function () { return 7; }
|
Window_OmoMenuOptionsCategory.prototype.standardPadding = function () { return 7; }
|
||||||
Window_OmoMenuOptionsCategory.prototype.maxCols = function () { return 5; };
|
Window_OmoMenuOptionsCategory.prototype.maxCols = function () { return 5; };
|
||||||
Window_OmoMenuOptionsCategory.prototype.makeCommandList = function () {
|
Window_OmoMenuOptionsCategory.prototype.makeCommandList = function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue