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

ACECORP

Founder & Entrepreneur
Veteran
Joined
Apr 6, 2016
Messages
253
Reaction score
39
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.



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



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,115
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
253
Reaction score
39
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; } } })();
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top