From a7ed8b323986b340a884d71aa28abc1a6c93825e Mon Sep 17 00:00:00 2001 From: OleSTEEP Date: Thu, 8 Feb 2024 16:18:10 +0300 Subject: [PATCH] PIXI Controls: Enable by default --- www.rus/js/plugins/Omori Title Screen.js | 3 ++ www.rus/js/plugins/VND_ONSControls.js | 33 ------------- www.rus/js/porting/jscontrols.js | 62 ++++++++++++------------ 3 files changed, 34 insertions(+), 64 deletions(-) diff --git a/www.rus/js/plugins/Omori Title Screen.js b/www.rus/js/plugins/Omori Title Screen.js index 968d79d..601a99b 100644 --- a/www.rus/js/plugins/Omori Title Screen.js +++ b/www.rus/js/plugins/Omori Title Screen.js @@ -112,6 +112,8 @@ Scene_OmoriTitleScreen.prototype.create = function () { // Super Call Scene_BaseEX.prototype.create.call(this); + // ONSControls + ONSControls.initialize(); this.createFilters(); // Create Background @@ -132,6 +134,7 @@ Scene_OmoriTitleScreen.prototype.create = function () { this.createGeneralOptionsWindow(); this.createAudioOptionsWindow(); this.createControllerOptionsWindow(); + this.createONSControlsOptionsWindow(); // ONSControls Settings this.createSystemOptionsWindow(); this.createExitPromptWindow(); this.createOptionCategoriesWindow(); diff --git a/www.rus/js/plugins/VND_ONSControls.js b/www.rus/js/plugins/VND_ONSControls.js index 35d9cfe..442f111 100644 --- a/www.rus/js/plugins/VND_ONSControls.js +++ b/www.rus/js/plugins/VND_ONSControls.js @@ -770,39 +770,6 @@ Window_OmoMenuOptionsONSControls.prototype.add = function () { Scene_OmoriTitleScreen.prototype.optionWindows = function () { 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 () { // Super Call Scene_OmoMenuBase.prototype.create.call(this); diff --git a/www.rus/js/porting/jscontrols.js b/www.rus/js/porting/jscontrols.js index aef1097..e8f989e 100644 --- a/www.rus/js/porting/jscontrols.js +++ b/www.rus/js/porting/jscontrols.js @@ -301,37 +301,37 @@ function setupKey(id, key, keyCode) { window.addEventListener('load', () => { create_fps_button(); // Remove in release - create_new_controls(); // Remove in release - if (navigator.getGamepads().length == 0) { - create_control_buttons(); - create_dpad_buttons(); - create_show_button(); - create_switch_button(); - setupButtons(); - setupDpad(); - } + // create_new_controls(); // Remove in release + // if (navigator.getGamepads().length == 0) { + // create_control_buttons(); + // create_dpad_buttons(); + // create_show_button(); + // create_switch_button(); + // setupButtons(); + // setupDpad(); + // } }); -window.addEventListener('gamepadconnected', () => { - var DivBMain = document.getElementById("gamepad-div"); - var DivB_LB = document.getElementById("buttonW"); - var DivB_RB = document.getElementById("buttonQ"); - var DivDMain = document.getElementById("dpad-div"); - var DivJoy = document.getElementById("joyDiv"); - var ShowB = document.getElementById("switch"); +// window.addEventListener('gamepadconnected', () => { +// var DivBMain = document.getElementById("gamepad-div"); +// var DivB_LB = document.getElementById("buttonW"); +// var DivB_RB = document.getElementById("buttonQ"); +// var DivDMain = document.getElementById("dpad-div"); +// var DivJoy = document.getElementById("joyDiv"); +// var ShowB = document.getElementById("switch"); - if (DivBMain !== null) { - DivBMain.remove(); - DivB_LB.remove(); - DivB_RB.remove(); - ShowB.remove(); - switch (currentControlElement) { - case "dpad": - DivDMain.remove(); - break; - case "joystick": - DivJoy.remove(); - break; - } - } -}); \ No newline at end of file +// if (DivBMain !== null) { +// DivBMain.remove(); +// DivB_LB.remove(); +// DivB_RB.remove(); +// ShowB.remove(); +// switch (currentControlElement) { +// case "dpad": +// DivDMain.remove(); +// break; +// case "joystick": +// DivJoy.remove(); +// break; +// } +// } +// }); \ No newline at end of file