Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
92
Reaction score
15
First Language
English
Primarily Uses
RMMV
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 damn 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

  • Untitled-1.jpg
    Untitled-1.jpg
    248 KB · Views: 21

Latest Threads

Latest Posts

Latest Profile Posts

At this point, "unique and diverse cast of characters" might as well be slang for Every Character is a Human-Sue.
I found an absolutely brilliant lifehack on the internet today.

Screenshot_760.jpg
It does sometimes get a little embarrassing that I often come here to ask for help with something and seldom have anything to actually show for it. If there is one thing though I can commend myself for, it's for sticking with an idea I've been tinkering with for this long now and gradually making headways. Even though I've been reserved about my progress, I can say I'm farther now than where I initially started.
I'm gonna put my project on pause for a tiny bit so I can explore the engine outside of it... Winging it can only get you so far LMFAO

Forum statistics

Threads
116,137
Messages
1,096,093
Members
151,561
Latest member
tucheka
Top