Yanfly MessageCore Name Box alteration help.

Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
48
Reaction score
3
First Language
English
Primarily Uses
Hi All, I've been tinkering with this all day, but what I am trying to do is keep the Name box to the left but have the text inside be centered in the window. I've gotten close. The text is currently acting centered but it is moved a little too the right in the message window and I can't quite figure out why. Probably because I am still pretty dayum noob at directly working with code. Any advice would be very much appreciated. Let me know if you need any other additional information. I have attached a screen shot of how it is behaving and here is the current edit of the code function that I am using:

Code:
Window_NameBox.prototype.refresh = function(text, position) {
    this.show();
    this._lastNameText = text;
    this._text = Yanfly.Param.MSGNameBoxText + text;
    this._position = position;
    this.width = 400;
    this.createContents();
    this.contents.clear();
    this.resetFontSettings();
    this.changeTextColor(this.textColor(Yanfly.Param.MSGNameBoxColor));
    var bleep = this.textWidth(text) / 2;
    var tx = this.width / 2 - bleep;
    this.drawTextEx(this._text, tx, 0);
    this._parentWindow.adjustWindowSettings();
    this._parentWindow.updatePlacement();
    this.adjustPositionX();
    this.adjustPositionY();
    this.open();
    this.activate();
    this._closeCounter = 4;
    return '';
};
 

Attachments

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Told my five year old she couldn't have any more candy as it was nearly bed time. She looked at me and said "Don't you know people die with no food?"
Need Antidote for a cold. x,x
Just bought another dlc off of steam. I'm loving these "POP!" packs :)
Every once in awhile, somebody reminds me events don't normally pass through each other. What's next? Maps with borders? Weirdos. :LZSwink:
How do Yu Gi Oh main characters manage to always pull out the right card? I keep loosing duels due to not getting any monsters to defend myself :(

Forum statistics

Threads
93,436
Messages
912,373
Members
122,952
Latest member
Tzimisce0573
Top