Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
95
Reaction score
18
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 Profile Posts

party time.png
If you've played Knight Shift Chapter 1 this image'll mean something to you. If not, that's also fine!
Here's a medical question for ya: Why do I start lightly coughing after I drink coffee?
Well, someone "reviewed" my game. Didn't credit me anywhere in the video and spent 2 minutes insulting it. Going to ignore that and move on.
To cut down on map lag, I've been researching how to implement a lighting layer as a single map overlay instead of a bunch of individual lights. Hopefully I'll have a screenshot soon!
Imagine having a game broken up into a whole bunch of chapters? Like Chapter 11 should be about the party members going bankrupt.

Forum statistics

Threads
117,265
Messages
1,105,960
Members
153,440
Latest member
VicArt
Top