Status
Not open for further replies.

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
361
Reaction score
52
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
281
Reaction score
310
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
361
Reaction score
52
First Language
Spanish
Primarily Uses
RMMV
It works, thanks :)
 

slimmmeiske2

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

Fire-Emblem Style Level Up System, Boost on Class Change, And Animated Arrows | RPG Maker News #115

Why keyboards don't sleep? Because they have two shifts.
I realized a while ago my game was toooo big in scope. even now I wonder am I trying to do too much by myself. and that's after completely changing the format of the game.
Last week at SLC. Cali awaits. TBH I love SLC more than SF.
Back home now. I had a good time, but I had a checkup this morning so I had to come home for that. Now I'm just waiting for my therapist meeting tomorrow...
Decided to work on Wishful Wanda today. Since it's a BFB spinoff game, I decided to make the Huang brothers
Easter eggs! I'm actually pitching this to the BFDI team, btw.

Forum statistics

Threads
113,933
Messages
1,078,517
Members
148,044
Latest member
Sernyx
Top