is there a plugin that allows me to alter the Y position of text for the entire game? A LOT of pixel fonts I've tried has the text set WAY to low and I'd prefer it to be more lined up with the center of text boxes. There was one I WAS using this one but it has some weird conflict stuff with visustella mz's message core
MZ Plugin to change the position of text's height?
JS Plugin RequestsHaven't tested but it might work. Create a new plugin with any name and paste this:
Replace 5 with any number you like.
Code:
(function() {
const _WindowBase_drawText = Window_Base.prototype.drawText;
Window_Base.prototype.drawText = function(text, x, y, maxWidth, align) {
_WindowBase_drawText.call(this, text, x, y - 5, maxWidth, align);
}
const _WindowBase_drawTextEx = Window_Base.prototype.drawTextEx;
Window_Base.prototype.drawTextEx = function(text, x, y, width) {
_WindowBase_drawTextEx.call(this, text, x, y - 5, width);
}
})()
Replace 5 with any number you like.
I needed that too, worked like a charm. +3 was perfect for me.
Small stuff like that actually bother me to an unreasonable degree so thanks xD
Small stuff like that actually bother me to an unreasonable degree so thanks xD
This works for name boxes and choice boxes, but it doesn't seem to work on the title screen. Any way to fix that?
Can you try this one?
Code:
Window_TitleCommand.prototype.itemHeight = function() {
return Window_Command.prototype.itemHeight.call(this) - 5; // change to move items up
};
Unfortunately this only changes the size of the boxes and not the height of the text.
Sorry I had a moment of stupid but you can adjust it here
Code:
(function() {
const _drawItem = Window_TitleCommand.prototype.drawItem;
Window_TitleCommand.prototype.drawItem = function(index) {
const rect = this.itemLineRect(index);
rect.y += 12; // You can adjust it here. You can make it -= to make it move up
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawText(this.commandName(index), rect.x, rect.y, rect.width, this.itemTextAlign());
};
})();
Okay I might be stupid because It's not working
This code repositions the texts for every window regardless of its type unless a window type has special rules. The title screen has no special rule that I'm aware of. Maybe you have other plugins that block my plugin's behaviour.
I tried it in a vanilla project and most likely you have a contradicting plugin
Original thread: https://forums.rpgmakerweb.com/threads/plugin-to-change-the-position-of-texts-height.178481/