Russian: Pixel-perfect title commands

This commit is contained in:
OleSTEEP 2024-01-15 20:55:44 +03:00
parent f351db40b1
commit 8ef74a9410
2 changed files with 9 additions and 4 deletions

View file

@ -14,21 +14,24 @@ Scene_OmoriTitleScreen.prototype.createTitleCommands = function() {
// Text Array
var textList = LanguageManager.getMessageData("XX_BLUE.Omori_Title_Screen").commands
// Get Center X Position
var centerX = Math.floor((Graphics.width - (154 * textList.length)) / 1.8) // Original: 156, Mod: 169
var centerX = 20;
// Go Through Text Array
var previous_width = 0;
for (var i = 0; i < textList.length; i++) {
// Get Text
var text = textList[i];
// Create Window
var win = new Window_OmoTitleScreenBox(text);
// Set Wnidow Position
win.x = centerX + (i * (144 + 10)); // Original: 130, Mod: 144
win.x = centerX + previous_width;
previous_width += win.width + 15;
win.y = Graphics.height //(Graphics.height - win.height) - 22
// Select Window
if (i === this._commandIndex) { win.select(0)}
// Add window to title Commands
this._titleCommands[i] = win;
this.addChild(win)
console.log(win.width)
};
// Set Continue text
this._titleCommands[1].setText(textList[1], this._canContinue);