Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parserutils.php on line 205

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parserutils.php on line 208

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parserutils.php on line 389

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parserutils.php on line 530

Deprecated: Function split() is deprecated in /var/www/siebn.de/wiki/inc/auth.php on line 154
bs2_codinghelp_menu [Burning Sand Wiki]
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /var/www/siebn.de/wiki/inc/template.php on line 242
 

Help Main Menu

The MENU Command

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
  • MenuType buy essays
    • LEFT, RIGHT, TOP, BOTTOM correspond to each side menu.
    • SUB is used to make a sub-menu.
  • SubCommand
    • ADD will add a normal menu.
    • ADDBORDER will add a menu with a color border.
    • ADDDRAG will add a “draggable” button, like the select size button slider.
  • TipType (used for internal)
    • TEXT will display any text you provide as TipText
    • ELEMENT will display any element you provide as TipText
    • GROUP will display any group you provide as TipText
  • PictureType (what will be on the screen)
    • TEXT will display the text you provide as PictureText
    • ELEMENT will display the picture of the element you provide as PictureText
    • ELEMENTNAME will display the name of the element you provide as PictureText
    • GROUP will display the picture of the group you provide as PictureText
    • GROUPNAME will display the name of the group you provide as PictureText
    • NUMBER will display the variable content you provide as PictureText
    • PICTURE will display any picture you provide as PictureText. This must be a filename (.png) present in the \IMG\ folder of BS2.
    • TEXT is used if you want to display a text as the menu,
  • Trigger
    • Can be any 1 line command.
    • Can be the name of a function. You can provide parameters if necessary for custom essay paper.

Clearing a Menu

Syntax:

MENU MenuType CLEAR

Refreshing all Menu

Syntax:

MENU REFRESH

Use this and it will refresh all variable value you would have put as a menu.

ADD, ADDBORDER, ADDDRAG

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.

Example

Take a look at this sample of code from my clock mod.

Showing Hex icon in a menu

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”.

Creating a menu

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”.

menuClock

Creating a sub-menu

...
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 SUBMENU
The first line, create a new sub menu called “menuSize” in the mainmenu called “menuClock”.
Then the function menuSize is what is executed when you click on the menuSize menu.
And this function will add 3 sub-menu, Small, Medium, Large. They correspond to the size of the clock.
Now whenever you click on one of this sub-menu, Medium for example, you will execute the function called “ChangeClockSize” with the size parameters being 60 for medium size.
 

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /var/www/siebn.de/wiki/inc/template.php on line 785
bs2_codinghelp_menu.txt · Last modified: 2010/10/26 00:54 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki