Edit: Still looking for help with this. I don't know where to find the functions I need to access to make any of this happen. The other poster is probably busy, but never sent over the help so I'm still at square 0, haha.
I have a new question. In my menu, I would like for the Items image to shift to the right and show a cursor to the left of it when you mouseover it or if you access it via the keyboard by pressing up/down. The cursor is just an image, not a replacement for the game's cursor. It's just meant to display next to the menu command that's 'selected'.
Additionally, I'm stuck on how to add the 'link' to the items scene when you click or press 'ok'. Can that only be done with a command window and this.addCommand? If so, is it possible to make a command window with images instead of text? That would make my life a lot easier, so long as I could remove the flashing overlay and still make the button image shift over.
I have a new question. In my menu, I would like for the Items image to shift to the right and show a cursor to the left of it when you mouseover it or if you access it via the keyboard by pressing up/down. The cursor is just an image, not a replacement for the game's cursor. It's just meant to display next to the menu command that's 'selected'.
Additionally, I'm stuck on how to add the 'link' to the items scene when you click or press 'ok'. Can that only be done with a command window and this.addCommand? If so, is it possible to make a command window with images instead of text? That would make my life a lot easier, so long as I could remove the flashing overlay and still make the button image shift over.
So far everything works except for clicking on 'Items', which currently gives an undefined error because it's not defined yet lol.
function Scene_Menu() {
this.initialize.apply(this, arguments);
}
var menubg = new Sprite (ImageManager.loadPicture("MenuBG_WithINFO"))
Scene_Menu.prototype = Object.create(Scene_Base.prototype);
Scene_Menu.prototype.constructor = Scene_Menu;
Scene_Menu.prototype.initialize = function() {
Scene_Base.prototype.initialize.call(this);
this.addChild(menubg);
this._buttons = []; // This will be for assigning a .push method to our buttons and gathering x/y coords I think.
this._menuPhase = 0; // This is for assigning which button leads where.
this._chosenButton = 0; // This is for assigning functionality to buttons.
this.createSideBar();
this.createAttributes();
this.createTitleImg();
this.createButtonItems();
};
Scene_Menu.prototype.createSideBar = function() {
this._side = new Sprite(ImageManager.loadPicture("Menu_SidebarCommands"));
this._side.x = 75;
this._side.y = 75;
this.addChild(this._side);
};
Scene_Menu.prototype.createAttributes = function() {
this._attr = new Sprite(ImageManager.loadPicture("Menu_CharandAttributes"));
this._attr.x = 450;
this._attr.y = 75;
this.addChild(this._attr);
};
Scene_Menu.prototype.createTitleImg = function() {
this._lm = new Sprite(ImageManager.loadPicture("Label_Menu"));
this._lm.x = 40;
this._lm.y = 8;
this.addChild(this._lm);
};
Scene_Menu.prototype.createButtonItems = function() {
var button = new Sprite(ImageManager.loadPicture("ButItems"));
button.x = 90;
button.y = 82;
this._buttons.push (button);
this.addChild (button);
};
Scene_Menu.prototype.update = function() {
Sprite.prototype.update.call(this);
switch (this._menuPhase) {
case 0:
if (Input.isTriggered ("cancel")||TouchInput.isCancelled ()) SceneManager.pop(); {
}
if (Input.isTriggered ("up")) {
this._chosenButton -= 1;
}else if (Input.isTriggered ("down")) {
this._chosenButton += 1;
}
break;
}
//that for loop designates if one of them is chosen by mouse movement
for (var i = 0; i < this._buttons.length; i++){
if (TouchInput.x >= this._buttons[i].x && TouchInput.x <= this._buttons[i].x+this._buttons[i].width && TouchInput.y >= this._buttons[i].y && TouchInput.y <= this._buttons[i].y+this._buttons[i].height) {
this._chosenButton = i;
}
}
//allows using keyboard up to get to the end/beginning
if (this._chosenButton < 0) this._chosenButton = this._buttons.length -1;
if (this._chosenButton >= this._buttons.length) this._chosenButton = 0;
if (Input.isTriggered ("ok")||(TouchInput.isTriggered () && TouchInput.x >= this._buttons[this._chosenButton].x && TouchInput.x <= this._buttons[this._chosenButton].x+this._buttons[this._chosenButton].width && TouchInput.y >= this._buttons[this._chosenButton].y && TouchInput.y <= this._buttons[this._chosenButton].y+this._buttons[this._chosenButton].height)){
this.closeAll();
this.basicChange();
}
}

