stacked_menu_commands
Iniquity's menu system allows you to configure a 'STACKED MENU COMMAND'. This will allow one key to execute several menu commands. Stacked menu commands are extremely useful for this, as it saves on steps for the user, and pain for you. To configure a stacked command, you will need an option that would make this useful. An option I'll be using is the built in Tetris game, now there are two menu commands that do two separate things, but are both related to the game. The first one is the command to execute the game itself, this code is 'TP'. The other command is to view the high scores of players who have played, this code is 'TS'. These are the two commands that I will be stacking in my menu. 1. First select a menu that you will add the options to. In this case I will be adding the option to the 'MAIN' menu. 2. Load up the menu editor, load up the menu you want to add the commands to, and add an equal number of options as you will have commands. In this case I will add two options to the menu. 3. Edit the first new option so that it has they key that activates the command, as well as the initial function. For example, look at the screen below. ______________________________________________________________________________ \_________ . __________ . __ | ________ __ . ___/ // \ : \ \\ | \ : \ \\ \ : \ jp __/ \ | \ \ : \\ . \ \ \ | \\ \_________/____| //_____/_____ _/__________/______/_______/___ ' / [iniquity2.0] |____/ ========= /__________/ =============== \\____________/ (Iniquity Menu Editor [MAIN.MNU])::::::::::::::::::::::::::::::: ::: Current command 18 of 19 (a) Description Play The Internal Tetris Game. (b) Command help To Play The Game, Tetris. (c) Menu keys T (d) Access s25 (e) Menu command TP (f) Parameters (g) Hidden No ([) Previous (]) Next ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ À: iq config % arrows: move lightbar enter/key: select escape: quit menu :Ù Notice that I have the command 'TP' executed by this command. This menu option should have the description of what the command is going to do, you should also specify the key that will be used to activate the command as it is needed by this and the following options. The access is up to you, it depends on who you want to have access to this option, and the access expression should reflect that. 4. Now I move to the next option, and modify that to look something similar to what is below. ______________________________________________________________________________ \_________ . __________ . __ | ________ __ . ___/ // \ : \ \\ | \ : \ \\ \ : \ jp __/ \ | \ \ : \\ . \ \ \ | \\ \_________/____| //_____/_____ _/__________/______/_______/___ ' / [iniquity2.0] |____/ ========= /__________/ =============== \\____________/ (Iniquity Menu Editor [MAIN.MNU])::::::::::::::::::::::::::::::: ::: Current command 19 of 19 (a) Description (b) Command help (c) Menu keys T (d) Access s25 (e) Menu command TS (f) Parameters (g) Hidden Yes ([) Previous (]) Next ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ À: iq config % arrows: move lightbar enter/key: select escape: quit menu :Ù Now, this is set up a little different, I have the tetris high scores command activated immediately after the game has been played. Not that there is not description, or help line; These are not needed as they will not be seen anyway even if the command is not hidden. The key is the same, however, or else it wouldn't work. In this case I have hidden the command, just for the sakes of doing so, it is not necessary to hide the command as it will never be seen. 5. Now save the menu and try it out, you may or may not need to do a few modifications so that it runs the way you want it to, but the basics are shown here so that should help get you going.
stacked_menu_commands.txt · Last modified: by admin