Status
Not open for further replies.

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
411
Reaction score
68
First Language
Spanish
Primarily Uses
RMMV
Here'she code for changing window's heigth:

Code:
Window_Base.prototype.lineHeight = function() {
    if ($gameSwitches.value(19, true)) {
        return 26;
    } else {
        return 36;
    }
};
Seems simple enough, but it doesn't work for the width, so "Window_Base.prototype.lineWidth" won't do anything for me. Any solution?
 

SeaPhoenix

Veteran
Veteran
Joined
May 14, 2015
Messages
295
Reaction score
342
First Language
English
Primarily Uses
RMMV
Looks like you're using MV? The choice window's width is determined by the "widest" choice, bounded by a minimum width (96 in the second function below) and a maximum (Graphics.boxWidth, i.e., the width of the game window). The code can be found in rpg_windows.js (assuming you're not using any plugins that affect the choicelist window):

Code:
Window_ChoiceList.prototype.windowWidth = function() {
    var width = this.maxChoiceWidth() + this.padding * 2;
    return Math.min(width, Graphics.boxWidth);
};

Window_ChoiceList.prototype.maxChoiceWidth = function() {
    var maxWidth = 96;
    var choices = $gameMessage.choices();
    for (var i = 0; i < choices.length; i++) {
        var choiceWidth = this.textWidthEx(choices[i]) + this.textPadding() * 2;
        if (maxWidth < choiceWidth) {
            maxWidth = choiceWidth;
        }
    }
    return maxWidth;
};
 

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
411
Reaction score
68
First Language
Spanish
Primarily Uses
RMMV
It works, thanks :)
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,938
Reaction score
5,851
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 Profile Posts

Stuff that bothers me: When I answer resource requests and the people don't even bother to answer wheather that was what they needed or say thank you in any way.
I'm tempted to leave the Fight/Escape choice in the Boss Battle submission and make Escape pop up Nedry from Jurassic Park: "Uh uh unh!"
Is it weird that i feel overwhelmed from reading codes that i wrote few months ago? Lol.

I dont even know where to continue!:hsad:
Ami
Gosh,I want to Play this Game Again one more again!

Seeing my Own Character & Kannono Once Again!
Tales_of_the_World_Radiant_Mythology_3_JPN_PSP-Coverart.jpg
I've been a bit to depressed to get work done on the game lately. Don't worry, I'll be okay.

Forum statistics

Threads
115,306
Messages
1,088,804
Members
149,955
Latest member
GamchiSamwise
Top