From 6b717a39f7de89f326c0cf2c5af7da8023ecb72a Mon Sep 17 00:00:00 2001 From: OleSTEEP Date: Sun, 14 Jan 2024 04:05:20 +0300 Subject: [PATCH] Fix comand hints on title menu --- www/js/plugins/CordovaFixes.js | 1 - www/js/plugins/Omori BASE.js | 6 +++--- www/js/plugins/Omori Title Screen.js | 4 +++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/www/js/plugins/CordovaFixes.js b/www/js/plugins/CordovaFixes.js index a1d7e15..ce0393f 100644 --- a/www/js/plugins/CordovaFixes.js +++ b/www/js/plugins/CordovaFixes.js @@ -251,7 +251,6 @@ Window_OmoMenuOptionsGeneral.prototype.processOptionCommand = function() { break; case 1: ConfigManager.gamepadTips = data.index === 0 ? false : true; - console.log(ConfigManager.gamepadTips); if(SceneManager._scene instanceof Scene_OmoriTitleScreen) { SceneManager._scene.refreshCommandHints(); // Refresh command title hints; } diff --git a/www/js/plugins/Omori BASE.js b/www/js/plugins/Omori BASE.js index 50f7f6c..8d71f47 100644 --- a/www/js/plugins/Omori BASE.js +++ b/www/js/plugins/Omori BASE.js @@ -36,13 +36,13 @@ Bitmap.prototype.initialize = function (width, height) { // Run Original Function _TDS_.OmoriBASE.Bitmap_initialize.call(this, width, height); // Default Input Icons - this._defaultInputIcons = 'keyboardBlack24'; + this._defaultInputIcons = 'gamepadBlack24'; }; //============================================================================= // * Get Default Input Icons //============================================================================= Bitmap.prototype.defaultInputIcons = function () { - return !ConfigManager.gamepadTips ? this._defaultInputIcons : 'gamepadBlack24'; + return ConfigManager.gamepadTips ? this._defaultInputIcons : 'keyboardBlack24'; } //============================================================================= @@ -130,7 +130,7 @@ Bitmap.prototype.drawKeyIcon = function (key, x, y, type = this.defaultInputIcon //============================================================================= // * Draw Input Icon //============================================================================= -Bitmap.prototype.drawInputIcon = function (input, x, y, gamepad = false, type = this.defaultInputIcons(), side = 0) { +Bitmap.prototype.drawInputIcon = function (input, x, y, gamepad = true, type = this.defaultInputIcons(), side = 0) { // Get Key Map gamepad = ConfigManager.gamepadTips; var map = gamepad ? Input.gamepadMapper : Input.keyMapper; diff --git a/www/js/plugins/Omori Title Screen.js b/www/js/plugins/Omori Title Screen.js index 8ac682a..61d2058 100644 --- a/www/js/plugins/Omori Title Screen.js +++ b/www/js/plugins/Omori Title Screen.js @@ -195,7 +195,7 @@ Scene_OmoriTitleScreen.prototype.createCommandHints = function () { this._commandHints = new Sprite(new Bitmap(Math.ceil(Graphics.boxWidth / 2.8), Math.ceil(Graphics.boxHeight / 8))) this.addChild(this._commandHints); this._commandHints.position.set(Graphics.boxWidth - this._commandHints.width, 0); - this.refreshCommandHints(); + //this.refreshCommandHints(); //this._commandHints.bitmap } @@ -577,6 +577,8 @@ Scene_OmoriTitleScreen.prototype.initFrameAnimations = function () { Scene_OmoriTitleScreen.prototype.start = function () { // Super Call Scene_BaseEX.prototype.start.call(this); + // Refresh command hints on scene start + this.refreshCommandHints(); // Initialize Frame Animations this.initFrameAnimations(); // If Instant Intro Flag is true