PIXI Controls: Enable by default

This commit is contained in:
OleSTEEP 2024-02-08 16:18:10 +03:00
parent bdd4aa7762
commit a7ed8b3239
3 changed files with 34 additions and 64 deletions

View file

@ -112,6 +112,8 @@ Scene_OmoriTitleScreen.prototype.create = function () {
// Super Call // Super Call
Scene_BaseEX.prototype.create.call(this); Scene_BaseEX.prototype.create.call(this);
// ONSControls
ONSControls.initialize();
this.createFilters(); this.createFilters();
// Create Background // Create Background
@ -132,6 +134,7 @@ Scene_OmoriTitleScreen.prototype.create = function () {
this.createGeneralOptionsWindow(); this.createGeneralOptionsWindow();
this.createAudioOptionsWindow(); this.createAudioOptionsWindow();
this.createControllerOptionsWindow(); this.createControllerOptionsWindow();
this.createONSControlsOptionsWindow(); // ONSControls Settings
this.createSystemOptionsWindow(); this.createSystemOptionsWindow();
this.createExitPromptWindow(); this.createExitPromptWindow();
this.createOptionCategoriesWindow(); this.createOptionCategoriesWindow();

View file

@ -770,39 +770,6 @@ Window_OmoMenuOptionsONSControls.prototype.add = function () {
Scene_OmoriTitleScreen.prototype.optionWindows = function () { Scene_OmoriTitleScreen.prototype.optionWindows = function () {
return [this._generalOptionsWindow, this._audioOptionsWindow, this._controlOptionsWindow, this._onscontrolsOptionsWindow, this._systemOptionsWindow] return [this._generalOptionsWindow, this._audioOptionsWindow, this._controlOptionsWindow, this._onscontrolsOptionsWindow, this._systemOptionsWindow]
} }
Scene_OmoriTitleScreen.prototype.create = function () {
// Super Call
Scene_BaseEX.prototype.create.call(this);
this.createFilters();
// Create Background
this.createBackground();
// Create Omori Sprite
this.createOmoriSprite();
// Create Title Sprites
this.createTitleSprites();
// Create Title Commands
this.createTitleCommands();
// Create Command Hints
this.createCommandHints();
// Create Version Text
this.createVersionText();
// Create Options Windows
this.createOptionWindowsContainer();
this.createHelpWindow();
this.createGeneralOptionsWindow();
this.createAudioOptionsWindow();
this.createControllerOptionsWindow();
this.createONSControlsOptionsWindow();
this.createSystemOptionsWindow();
this.createExitPromptWindow();
this.createOptionCategoriesWindow();
// Update world bitmaps
this.updateWorldBitmaps();
this.playBgm();
this.playBgs();
// this._backgroundSprite.filters = [this._glitchFilter]
};
Scene_OmoMenuOptions.prototype.create = function () { Scene_OmoMenuOptions.prototype.create = function () {
// Super Call // Super Call
Scene_OmoMenuBase.prototype.create.call(this); Scene_OmoMenuBase.prototype.create.call(this);

View file

@ -301,37 +301,37 @@ function setupKey(id, key, keyCode) {
window.addEventListener('load', () => { window.addEventListener('load', () => {
create_fps_button(); // Remove in release create_fps_button(); // Remove in release
create_new_controls(); // Remove in release // create_new_controls(); // Remove in release
if (navigator.getGamepads().length == 0) { // if (navigator.getGamepads().length == 0) {
create_control_buttons(); // create_control_buttons();
create_dpad_buttons(); // create_dpad_buttons();
create_show_button(); // create_show_button();
create_switch_button(); // create_switch_button();
setupButtons(); // setupButtons();
setupDpad(); // setupDpad();
} // }
}); });
window.addEventListener('gamepadconnected', () => { // window.addEventListener('gamepadconnected', () => {
var DivBMain = document.getElementById("gamepad-div"); // var DivBMain = document.getElementById("gamepad-div");
var DivB_LB = document.getElementById("buttonW"); // var DivB_LB = document.getElementById("buttonW");
var DivB_RB = document.getElementById("buttonQ"); // var DivB_RB = document.getElementById("buttonQ");
var DivDMain = document.getElementById("dpad-div"); // var DivDMain = document.getElementById("dpad-div");
var DivJoy = document.getElementById("joyDiv"); // var DivJoy = document.getElementById("joyDiv");
var ShowB = document.getElementById("switch"); // var ShowB = document.getElementById("switch");
if (DivBMain !== null) { // if (DivBMain !== null) {
DivBMain.remove(); // DivBMain.remove();
DivB_LB.remove(); // DivB_LB.remove();
DivB_RB.remove(); // DivB_RB.remove();
ShowB.remove(); // ShowB.remove();
switch (currentControlElement) { // switch (currentControlElement) {
case "dpad": // case "dpad":
DivDMain.remove(); // DivDMain.remove();
break; // break;
case "joystick": // case "joystick":
DivJoy.remove(); // DivJoy.remove();
break; // break;
} // }
} // }
}); // });