Fix comand hints on title menu
This commit is contained in:
parent
c07880876a
commit
6b717a39f7
3 changed files with 6 additions and 5 deletions
|
@ -251,7 +251,6 @@ Window_OmoMenuOptionsGeneral.prototype.processOptionCommand = function() {
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
ConfigManager.gamepadTips = data.index === 0 ? false : true;
|
ConfigManager.gamepadTips = data.index === 0 ? false : true;
|
||||||
console.log(ConfigManager.gamepadTips);
|
|
||||||
if(SceneManager._scene instanceof Scene_OmoriTitleScreen) {
|
if(SceneManager._scene instanceof Scene_OmoriTitleScreen) {
|
||||||
SceneManager._scene.refreshCommandHints(); // Refresh command title hints;
|
SceneManager._scene.refreshCommandHints(); // Refresh command title hints;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,13 +36,13 @@ Bitmap.prototype.initialize = function (width, height) {
|
||||||
// Run Original Function
|
// Run Original Function
|
||||||
_TDS_.OmoriBASE.Bitmap_initialize.call(this, width, height);
|
_TDS_.OmoriBASE.Bitmap_initialize.call(this, width, height);
|
||||||
// Default Input Icons
|
// Default Input Icons
|
||||||
this._defaultInputIcons = 'keyboardBlack24';
|
this._defaultInputIcons = 'gamepadBlack24';
|
||||||
};
|
};
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// * Get Default Input Icons
|
// * Get Default Input Icons
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
Bitmap.prototype.defaultInputIcons = function () {
|
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
|
// * 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
|
// Get Key Map
|
||||||
gamepad = ConfigManager.gamepadTips;
|
gamepad = ConfigManager.gamepadTips;
|
||||||
var map = gamepad ? Input.gamepadMapper : Input.keyMapper;
|
var map = gamepad ? Input.gamepadMapper : Input.keyMapper;
|
||||||
|
|
|
@ -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._commandHints = new Sprite(new Bitmap(Math.ceil(Graphics.boxWidth / 2.8), Math.ceil(Graphics.boxHeight / 8)))
|
||||||
this.addChild(this._commandHints);
|
this.addChild(this._commandHints);
|
||||||
this._commandHints.position.set(Graphics.boxWidth - this._commandHints.width, 0);
|
this._commandHints.position.set(Graphics.boxWidth - this._commandHints.width, 0);
|
||||||
this.refreshCommandHints();
|
//this.refreshCommandHints();
|
||||||
//this._commandHints.bitmap
|
//this._commandHints.bitmap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -577,6 +577,8 @@ Scene_OmoriTitleScreen.prototype.initFrameAnimations = function () {
|
||||||
Scene_OmoriTitleScreen.prototype.start = function () {
|
Scene_OmoriTitleScreen.prototype.start = function () {
|
||||||
// Super Call
|
// Super Call
|
||||||
Scene_BaseEX.prototype.start.call(this);
|
Scene_BaseEX.prototype.start.call(this);
|
||||||
|
// Refresh command hints on scene start
|
||||||
|
this.refreshCommandHints();
|
||||||
// Initialize Frame Animations
|
// Initialize Frame Animations
|
||||||
this.initFrameAnimations();
|
this.initFrameAnimations();
|
||||||
// If Instant Intro Flag is true
|
// If Instant Intro Flag is true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue