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,941
Reaction score
5,855
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

I'm making Toilet in Wonderland 2. and tell vinny about it lol
WE ARE THE BORG. YOUR BIOLOGICAL AND TECHNOLOGICAL DISTINCTIVENESS WILL BE ADDED TO OUR OWN. RESISTANCE IS FUTILE.
D2R save files are so broken. how was the beta test better then the full release. blizzard's last hope crashed and burned.
they're getting no more chances from me.
Anyone going to talk about Chris Pratt Mario?

Forum statistics

Threads
115,336
Messages
1,089,104
Members
150,008
Latest member
samuca07
Top