The menu command can be use in many ways. It can be usefull to display counter or selection.
Please take a look at my Clock Mod for a good example of the use of the menu command.
Syntax:
MENU MenuType SubCommand TipType TipText PictureType PictureText Trigger
Syntax:
MENU MenuType CLEAR
Syntax:
MENU REFRESH
Use this and it will refresh all variable value you would have put as a menu.
In those example i use the TOPMENU as the MenuType Syntax:
MENU TOPMENU ADD TipType TipText PictureType PictureText Trigger MENU TOPMENU ADDDRAG TipType TipText PictureType PictureText Trigger
Those are use the same way, except that a drag button is “draggable”.
MENU TOPMENU ADDBORDER TipType TipText PictureType PictureText Trigger Red Green Blue
Pretty much the same as above, except you must provide the RGB color of the border.
Take a look at this sample of code from my clock mod.
You cant add directly an Hex icon in the menu, you must make a useless element with the Hex you want to display. Then you add a menu with the picture of that element. Here is how you can do it:
Element Clear Bidon 255 0 0 500 1 1 1 0 Clear 1500 HEX 0000000000000000003FF80000FFFE0001E00F0003800380070001C00E0000E01C000070180000303B0000383180001830E000183070001830380018301E1FD8301FFF18300FF818300FE0183006001838000038180000301C0000700E0000E0070001C00380038001E00F0000FFFE00003FF800000000000000000000000000 255 255 255 MENU TOP ADD TEXT "Clock" ELEMENT ELEMENT:Bidon menuClock
Just take a look at the image below to see the clock icon on the “menuClock”.
Again, take a look at this piece of code from my clock mod.
REMOVETRIGGER menuClock MENU TOP ADD TEXT "Clock" ELEMENT ELEMENT:Bidon menuClock ON menutop MENU TOP ADD TEXT "Clock" ELEMENT ELEMENT:Bidon menuClock ON menuClock MENU SUB CLEAR ON menuClock MENU SUB ADD TEXT "Display" TEXT "Display" <EXEC writetime txtX txtY txtelement txtsize> ON menuClock MENU SUB ADD TEXT "Size >" TEXT "Size >" menuSize ON menuClock MENU SUB ADD TEXT "Position >" TEXT "Position >" menuPosition ON menuClock MENU SUB ADD TEXT "Element >" TEXT "Element >" menuElement ON menuClock MENU SUB ADD TEXT "Refresh Rate >" TEXT "Refresh Rate >" menuRefreshrate ON menuClock MENU SUB ADD TEXT "Border >" TEXT "Border >" menuBorder ON menuClock MENU SUB ADD TEXT "Second >" TEXT "Second >" menuSecond ON menuClock SUBMENU
As you can see in the image all of menuClock's submenus are created here. I have added a ”>” at the end of almost all sub-menus to indicate that they have submenus too. So when you click on one of these, the corresponding submenu will be show, like the example image above for the “menuSize”.
... ON menuClock MENU SUB ADD TEXT "Size >" TEXT "Size >" menuSize ... REMOVETRIGGER menuSize ON menuSize MENU SUB CLEAR ON menuSize MENU SUB ADD TEXT "Small" TEXT "Small" <EXEC ChangeClockSize 30> ON menuSize MENU SUB ADD TEXT "Medium" TEXT "Medium" <EXEC ChangeClockSize 60> ON menuSize MENU SUB ADD TEXT "Large" TEXT "Large" <EXEC ChangeClockSize 90> ON menuSize SUBMENUThe first line, create a new sub menu called “menuSize” in the mainmenu called “menuClock”.