Status
Not open for further replies.

Mark91

Veteran
Veteran
Joined
May 19, 2017
Messages
152
Reaction score
17
First Language
Italian
Primarily Uses
RMMV
Hi,
I need to call the input name scene, and I'm using this script;

Code:
SceneManager.push(Scene_Name);
SceneManager.prepareNextScene(3, 32);

("3" is the actor's ID and "32" is the name max lenght).
The problem is this:
kboard.PNG

Compared to the rest of the screen (I use a 1920x1080 screen resolution) the input name scene is still too...small and it cuts part of the name as you can see in the pic.
Is there a way to modify this scene's width?
 

SeaPhoenix

Veteran
Veteran
Joined
May 14, 2015
Messages
297
Reaction score
343
First Language
English
Primarily Uses
RMMV
The relevant code is in rpg_windows.js. You can change the width by putting this in a new plugin (480 is the default width, so you can increase it to another number):

JavaScript:
Window_NameEdit.prototype.windowWidth = function() {
    return 480;
};

Note that the letters in the bottom window will not be centered. If you want it to look more centered, you can modify the x value in the code below. For instance, one easy way would be to add a number to the x value, e.g., x: 100 + ... (the rest of it remains the same), or you can do the math to center it.

JavaScript:
Window_NameInput.prototype.itemRect = function(index) {
    return {
        x: index % 10 * 42 + Math.floor(index % 10 / 5) * 24,
        y: Math.floor(index / 10) * this.lineHeight(),
        width: 42,
        height: this.lineHeight()
    };
};
 

Mark91

Veteran
Veteran
Joined
May 19, 2017
Messages
152
Reaction score
17
First Language
Italian
Primarily Uses
RMMV
Woooow that's great! Thanks a lot!
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,947
Reaction score
5,856
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Just finished eventing a couple simple puzzles in RMMV, for my very first game "Sample Quest." Just messing around, throwing things together, and calling it a story XD On a non-RM note, got my hair cut today!
I feel the need to inform everyone on the forums NOT to go with Web Hosting Canada for your hosting needs. It is by far the worst customer service and just overall experience I have ever had with hosting and I am Canadian...
BCj
Got another eye surgery monday. Hope I'll recover quick and all's well. A bit tired of surgeries. On a happy note, working on the next chapter of Escalia so hope I can continue soon :)
Celebrating the arrival of autumn in the Northern Hemisphere :)

Forum statistics

Threads
115,366
Messages
1,089,306
Members
150,055
Latest member
Cthulhu95
Top