Help with Horizontal Menus [VX ACE]

Hey all!

I think I overcomplicated my presentation on this, so I'm revamping the request.

~~

I would like someone to make me a horizontal row of icons or items (IN A WINDOW) that can be swapped around by the user while in-game.

So (for example) this:

icon 1, icon 2, icon 3, icon 4


Could become this:

icon 3, icon 2, icon 1, icon 4

~~

Much like how formation allows you to swap party members around, I am trying to figure out how to do that with a horizontal row of icons or items.

So if anyone could make something small like this for me so that I can then dissect it myself and see what I'm not currently understanding I'd very much appreciate it.

Thanks fam!
Perhaps the best solution would be to assign a button for moving options. If you used ALT, in this example, then once you pressed ALT once, you would save the index variable the player chose. So, player pressing "Option 3" means the game would store index number 2. (Indexes start at 0, I think)

Then, once the player presses ALT on another index...example, "Option 1", so index 0. You would have to refresh the window and draw the commands in their proper order. I think VX Ace draws command lists in the order they are hard coded in...So you'd need to find a way around that
You could use two @variables or an @array that will hold two items. Make it a two step process like using the selector first to mark the first option to be swapped, then keep it frozen (not updated but still visible) while you pick the second option. Swap them, it's quite easy to do indeed, go check out how the default scripts defines the options. There modify it in such a way as to use a different @array that will store all of the available options. I think the rest of this process is self evident now. =_=¡
Perhaps the best solution would be to assign a button for moving options. If you used ALT, in this example, then once you pressed ALT once, you would save the index variable the player chose. So, player pressing "Option 3" means the game would store index number 2. (Indexes start at 0, I think)

Then, once the player presses ALT on another index...example, "Option 1", so index 0. You would have to refresh the window and draw the commands in their proper order. I think VX Ace draws command lists in the order they are hard coded in...So you'd need to find a way around that

Sorry, I think I overcomplicated what I was trying to do. I've since edited the original post to make it clearer to understand.

I know the script will probably use a form of "pending_index" like you say, but it doesn't need alternate inputs. The script I want can be as simple as 4 icons that simply exist to be moved around by the player horizontally.

~~

You could use two @variables or an @array that will hold two items. Make it a two step process like using the selector first to mark the first option to be swapped, then keep it frozen (not updated but still visible) while you pick the second option. Swap them, it's quite easy to do indeed, go check out how the default scripts defines the options. There modify it in such a way as to use a different @array that will store all of the available options. I think the rest of this process is self evident now. =_=¡

My brain's kind of stopped working on this one (hence why this is in script requests rather than Ruby learning), but if it ever manages to kick itself into gear again then thanks for the tip on a place I can look (still just plodding slowly through all the windows at the moment lol).
I know the script will probably use a form of "pending_index" like you say, but it doesn't need alternate inputs. The script I want can be as simple as 4 icons that simply exist to be moved around by the player horizontally.
You could just use your basic confirm button for it. There's not much of a logic difference!
Anyway you should look into https://forums.rpgmakerweb.com/index.php?threads/lune-item-grid.37399/ and see what they did, in spots like def command_move. Perhaps that is closer to what you would like

Original thread: https://forums.rpgmakerweb.com/threads/help-with-horizontal-menus-vx-ace.132708/