MV Still seeking help. Make images shift in custom menu on mouseover, and get images to work as commands.

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.

Spoiler: How it looks now:
example.jpg

Spoiler: How it should look:
MainMenuTest.png

Spoiler: Code:
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(); } }
you use an image for menu commands, is this single or double?
because I made from a button template 4 columns + amount of lengths.

this basicly show 1 image and show the index of activated or disabled.
so I can create buttons just like that, so it can shift that way, push out the button,
zoom out the button, or any possible way to create them.

if you use one like that too, it was easier fix, but if you talk to animated cursor,
than shift text, it would be a different story 🙂
I'm not sure what you mean by single or double, but there are multiple menu commands (like Items, Equip, Skills, etc) all in a single column.

So I set the image to either activated or disabled, but how I do make the images shift over? The x and y are declared within each individual image (or button), but I don't know how to access those from another function and change them, because they're contained within themselves...if that makes sense.

The cursor doesn't have to be animated, I just want it to show up next to the selected or hovered image after it shifts to the right.
This is a sample from my demo an my plugin to set up.
this is 2 images, same height, but you can say, left row = 50 pixels left,
so remove end, ond the other (right side) you put it on the side to push over
like this exsample (if you make the buttons as image:

sheet:
GE_ButtonSet.png

ingame:
sample.png

but this is rather the end game function, but main menu, have this, but also
disabled which cannot be selected.

but in this kind, you can push the state forward, not in an animated effected.
if you want to use text based (and animated cursor), it should be edited.

cursor is on "top" of the command selected, so if it's in front, you need to check
this cursor on the index in order to push forward.

the way this image works, you can also place the same button, but shift
the text in the way you like it.

making the status scene, or inventory require this setup, but I think you get the idea.
My menu is rather a bit unique in some ways, specially the equipment alternation.
because selection give you the "empty" selecteion slot, mine avoid that.

which all menu should have (even the default one). but I hope you get the idea
of image commands?
@ShadowDragon Yes that is exactly what I'm wanting to do!

So I tested a kind of hacky way to make this work by having 2 buttons for every image. One is at x: 90 and one is at x:110. This works, but it's layering the shifted over button on top of the old one. How do I remove the image below it?

I tried to find your demo but can't, so I'm still not sure where to start on implementing this.
the way mine is setup is like the image above, but read the index.
and as far I can see, you want 10 commands max, but the way you
set it up, is far different that I use it.

not sure why you call a variable outside a scene function?
but I send you the code through DM how I use my index, so you need
to see how to use it inside your menu, but if you rather use font by game
and is changeable, than I cannot help you. can help you with the image,
but you might need to alter it as well to work in your code.
Thank you very much for the offer!

I'm fine with having to alter the code, I just need help figuring out what code to use to hide or shift the images, but I'll take any help I can get.

Original thread: https://forums.rpgmakerweb.com/threads/still-seeking-help-make-images-shift-in-custom-menu-on-mouseover-and-get-images-to-work-as-commands.135988/