Using custom choice list with common events?

Occupant

Hypothetical
Member
Joined
Dec 4, 2017
Messages
15
Reaction score
9
First Language
English
Primarily Uses
RMMV
Hello everyone,

I am wondering if there is a way to use my own custom Window_ChoiceList with the common event "Show Choices".

My goal is to change the default position and sizes of the Window_ChoiceList when it is used for the "Show Choices" common event, as well as enable some extended "help window" features.

However, I'd still like to benefit from other plugins that add features to the "Show Choices" common event, such as HIME's "disable choices".

For example, if I have a custom Window_ChoiceList like so:

Code:
function My_Window_ChoiceList() {
  this.initialize(this, arguments);
}

My_Window_ChoiceList.prototype = Object.Create(Window_ChoiceList.prototype);
My_Window_ChoiceList.prototype.constructor = Window_ChoiceList;

// then various overrides to Window_ChoiceList functions
Are there ways I can use that class when Show Choices events are run, instead of the default?

So far, the only way I have thought it might work would be to override actual Window_ChoiceList prototype itself, perhaps by taking over one of the positions as an opportunity to specify my logic, like so:

Code:
var Default_Window_ChoiceList_updatePlacement = Window_ChoiceList.prototype.updatePlacement;
Window_ChoiceList.prototype.updatePlacement = function() {
  var positionType = $gameMessage.choicePositionType();
  if (Math.floor(positionType) === 0) { // take over the left position for custom code
    // do my custom updatePlacement stuff here
  }
  else Default_Window_ChoiceList_updatePlacement.call(this); // do default stuff for other positions
}
I think this would work, but it limits my options on how my custom code can be used (i.e. can't be used in other positions).

Thanks for any help!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top