Plugin to move a right justified Choice Box a specified number of pixels to left?

ACECORP

Founder & Entrepreneur
Veteran
Joined
Apr 6, 2016
Messages
257
Reaction score
40
First Language
English
Primarily Uses
RMMV
In RMMV, there is a choices box component that folks often use for Yes/No and other choices as shown below.

4ChoiceBox.png


The default placement options for this box are left, middle, and right as shown in the RMMV IDE

LMRCBOX.png


Does anyone have a plugin or has plugin code that can move the box a specified number of pixels to the left or right that is fully compatible with the Yanfly Plugin Suite?

For example, I have my boxes set "right" but I need to move them 400 px to the left so they are not in the middle but they are not on the far right either
 
Last edited:

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,152
First Language
English
Primarily Uses
RMMV
This isn't a full plugin but here's a start on what you would need to do:
PHP:
(function() {
    var alias_Window_ChoiceList_start = Window_ChoiceList.prototype.start;
    Window_ChoiceList.prototype.start = function() {
        alias_Window_ChoiceList_start.call(this);
        switch ($gameMessage.choicePositionType()) {
        case 0: //left
            this.x += 0;
            break;
        case 1: //middle
            this.x += 0;
            break;
        case 2: //right
            this.x -= 400;
            break;
        }
    }
})();
 

ACECORP

Founder & Entrepreneur
Veteran
Joined
Apr 6, 2016
Messages
257
Reaction score
40
First Language
English
Primarily Uses
RMMV
Awesome! That worked. Thanks so much!
 

NikosEdy2

Villager
Member
Joined
Dec 15, 2017
Messages
6
Reaction score
1
First Language
Greek
Primarily Uses
RMMV
How can we go back to Default settings after using this ?

Personally i use this (But i dont know how to reset the position after that)


(function() {
var alias_Window_ChoiceList_start = Window_ChoiceList.prototype.start;
Window_ChoiceList.prototype.start = function() {
alias_Window_ChoiceList_start.call(this);
switch ($gameMessage.choicePositionType()) {
case 0: //left
var messageY = this._messageWindow.y;
var messageHeight = this._messageWindow.height;
this.x = 355;
this.y = 130;
break; } } })();
 

Latest Threads

Latest Posts

Latest Profile Posts

I have been enjoying a game on my iPhone, called Wonderbox. It is just a little game where you create adventures, share them, whilst also being able to play others. It's a bit zelda-esque. I have started some youtube for those, gonna start with RPG maker things soon as well. So if you wish to see, do check it out :)
SF_People3_3 added!
index.php

ScreenShot_1_3_2022_1_32_12.png
I feel QSprite for MV is underrated. I basically am able to use my chibi sideview battlers I drew on the maps and have all the motions available. this'll help a lot with cutscenes.
I've figured out how to reasonably tall-ify chibi sprites on my editor. I like that making tall sprites gives me control on expressing how tall characters seem on the field relative to each other as well as better differentiate adult sprites from child sprites.
doing some wacky experimental stuff in MV right now :kaoluv: I cannot wait to drop what I've been working on

Forum statistics

Threads
118,562
Messages
1,116,959
Members
155,604
Latest member
Freedom1987
Top