I'm trying to alias a function from Yanfly Keyboard Config within a plugin I've created. What I want to do is make my code run after this function runs but if I so much as alias the function it messes up the function and it doesn't run at all. Maybe I'm doing something wrong?
I was able to successfully alias another function within the plugin and add the keys to the list of actions when you select a button to bind it but this one keeps giving me problems.
This is what I'm trying to do, this function is called to determine what text shows up on the keys if they are in use. I would like my parameters to show up as the name that gets drawn on the keys.
This code below will make the text show up on the keys but ONLY these keys and not every other key that is normally drawn using the original function in Yanfly Keyboard config.
If i do this below then no text will be drawn on any keys.
Hoping someone can help me figure out what it is I'm doing wrong here. :mrsatan:
I was able to successfully alias another function within the plugin and add the keys to the list of actions when you select a button to bind it but this one keeps giving me problems.
This is what I'm trying to do, this function is called to determine what text shows up on the keys if they are in use. I would like my parameters to show up as the name that gets drawn on the keys.
This code below will make the text show up on the keys but ONLY these keys and not every other key that is normally drawn using the original function in Yanfly Keyboard config.
JavaScript:
var Ritter_Window_KeyConfig = Window_KeyConfig.prototype.actionKey;
Window_KeyConfig.prototype.actionKey = function(action) {
Ritter_Window_KeyConfig.call(this,action);
switch(action) {
case Ritter.Params.togForButton[1]:
return Ritter.Params.togForName;
break;
case Ritter.Params.togBackButton[1]:
return Ritter.Params.togBackName;
break;
case Ritter.Params.useItemButton[1]:
return Ritter.Params.useItemName;
break;
}
};
If i do this below then no text will be drawn on any keys.
JavaScript:
var Ritter_Window_KeyConfig = Window_KeyConfig.prototype.actionKey;
Window_KeyConfig.prototype.actionKey = function(action) {
Ritter_Window_KeyConfig.call(this,action);
};
Hoping someone can help me figure out what it is I'm doing wrong here. :mrsatan: