Hi all,
I am creating a simple quest system, just two windows in a new Scene_Quest
The left window is getting populated with Quests based on a Global Array that can be modified via Plugin Command
It correctly shows the available quests.
The problem is that nothing happens when commands are clicked.
I checked via console.log and Scene_Quest.Update, Windows_Quest.Update and Windows_Quest.Update cursor are correctly called.
The problem comes with Window_Quest.processCursorMove. The process is called but I doesn't log anything else.
console.log("ProcessCursorMove called"); is shown in the console but not console.log("Cursor moved. Index:", this.index());
I also placed console log in evety cursor function like
But no console log is called
What I'm doing wrong? (for testing I also disabled any other plugin and called the scene just by push.Scene so there are no other scenes below)
I am creating a simple quest system, just two windows in a new Scene_Quest
The left window is getting populated with Quests based on a Global Array that can be modified via Plugin Command
It correctly shows the available quests.
The problem is that nothing happens when commands are clicked.
I checked via console.log and Scene_Quest.Update, Windows_Quest.Update and Windows_Quest.Update cursor are correctly called.
The problem comes with Window_Quest.processCursorMove. The process is called but I doesn't log anything else.
JavaScript:
Window_Quest.prototype.processCursorMove = function() {
console.log("ProcessCursorMove called");
if (this.isCursorMovable()) {
const lastIndex = this.index();
if (Input.isRepeated("down")) {
this.cursorDown(Input.isTriggered("down"));
}
if (Input.isRepeated("up")) {
this.cursorUp(Input.isTriggered("up"));
}
if (Input.isRepeated("right")) {
this.cursorRight(Input.isTriggered("right"));
}
if (Input.isRepeated("left")) {
this.cursorLeft(Input.isTriggered("left"));
}
if (!this.isHandled("pagedown") && Input.isTriggered("pagedown")) {
this.cursorPagedown();
}
if (!this.isHandled("pageup") && Input.isTriggered("pageup")) {
this.cursorPageup();
}
if (this.index() !== lastIndex) {
SoundManager.playCursor();
console.log("Cursor moved. Index:", this.index());
}
}
};
console.log("ProcessCursorMove called"); is shown in the console but not console.log("Cursor moved. Index:", this.index());
I also placed console log in evety cursor function like
JavaScript:
Window_Quest.prototype.cursorDown = function(wrap) {
console.log("Cursor Down");
const index = this.index();
const maxItems = this.maxItems();
const maxCols = this.maxCols();
console.log("Index:", index);
console.log("Max Items:", maxItems);
console.log("Max Cols:", maxCols);
if (index < maxItems - maxCols || (wrap && maxCols === 1)) {
this.select((index + maxCols) % maxItems);
this.ensureCursorVisible();
console.log("Cursor Selected:", this.index());
}
};
But no console log is called
What I'm doing wrong? (for testing I also disabled any other plugin and called the scene just by push.Scene so there are no other scenes below)