Copyright 2010-2017 Obihai Technology, Inc.
145
the <MainMenu> element. The following is an exmple of a customized Main Menu (showing page 1 of 2) with Line Keys
hidden, ncol="6", width="480", height="204", cell-wdith="80", cell-height="68", scrollstyle="2".
The full customization of the Main Menu is divided into two layers. The first layer defines the contents of the Main
Menu, such as the dimension of 2-D array, the number of items in the menu and what each item is and does. These are
specified with a <MainMenu> XML in the
Screen Item Customization
::
MainMenu
parameter. The second layer
defines the detail styling of each main menu items or a group of main menu items. These are specified with a
<MainMenuItemStyles> XML in the
Screen Item Customization
::
MainMenuItemStyles
parameter. These
XML are the subject of the next two sections
<MainMenu> XML
General Structure
<MainMenu ...>
<item id="x" ... />
...
<item id='y' ... />
</MainMenu>
The only required attribute of a <MainMenu> <item> element is
id
, which specifies the type of the item. All other
attributes are optional with well-defined default values if not specified. Each item is made up of the following
components:
-
background image: a different image can be specified for when the item is highlighted and not highlighted via
the hlimg and bgimg attributes respectively
-
background color: the fill color of the item’s background when background image is not specified or not the
image does not conver the entire background. A different background color can be specified for when the item
is highlighted and not highlighted via the bgcolor and hlcolor attributes
-
label: a text string by default shown on the bottom of item, usually used as the title of item
-
label2: an additional general purpose text string
-
icon: an icon by default shown at the center of the item, usually to reflect the current state of item. You may
specify an internal path of the picture file or a http/https URL via the icon attribute
-
icon2: an additional general purpose icon. You may specify an internal path of the picture file to use, or a
http/https URL via the icon2 attribute