Hello,
I hope this is the correct section for my question. If not, I am sorry.
At first I'm quite new to the maker "game". But I have some experience in scripting and programming. Thats why I'm trying to create my own plugin very soon.
For my plugin, I first perform a character selection. This is working very good. But after that I'm creating a new "Window_Selectable" window. This immediately executes its own "ok" event. The user has no chance to select anything.
What I also found out is that this will only happen if I am using my keyboard. If I am using the mouse everything is working fine.
This is my Code:
Open a new Window:
initializing the new window:
Maybe anyone has an idea to solve this 🙂
Thank you in advance.
Greetings RoPurX
*If needed I can post the complete plugin script. But I thought it is a bit too much Code.
I hope this is the correct section for my question. If not, I am sorry.
At first I'm quite new to the maker "game". But I have some experience in scripting and programming. Thats why I'm trying to create my own plugin very soon.
For my plugin, I first perform a character selection. This is working very good. But after that I'm creating a new "Window_Selectable" window. This immediately executes its own "ok" event. The user has no chance to select anything.
What I also found out is that this will only happen if I am using my keyboard. If I am using the mouse everything is working fine.
This is my Code:
Open a new Window:
Window_OurAct.prototype.checkClassWithTeacher = function(actorObj) {
if (actorObj._classId == TeackerClassID) {
var rec = new Rectangle();
rec.height = 600;
rec.width = 800;
rec.x = 0;
rec.y = 0;
var myWindow2 = new Window_RXSkillList(rec);
myWindow2.show();
this.close();
SceneManager._scene.addWindow(myWindow2);
} else {
alert("some test message");
}
};
initializing the new window:
function Window_RXSkillList() {
this.initialize(...arguments);
}
Window_RXSkillList.prototype = Object.create(Window_Selectable.prototype);
Window_RXSkillList.prototype.constructor = Window_RXSkillList;
Window_RXSkillList.prototype.initialize = function(rect) {
Window_Selectable.prototype.initialize.call(this, rect);
this._actor = $gameActors.actor(2);
this._stypeId = 1;
this.avSkillList = [$dataSkills[141], $dataSkills[142]];
this._data = [];
this.refresh();
this.hide();
this.setHandler("ok", this.onOK.bind(this));
this.activate();
};
Maybe anyone has an idea to solve this 🙂
Thank you in advance.
Greetings RoPurX
*If needed I can post the complete plugin script. But I thought it is a bit too much Code.