|
Name
This is the name of the MenuDef. This name will be used for
opening / closing the menu in GSC.
|
||
|
rect
Define a rectangle on the screen for the menu to occupy.
Menu rectangles may overlap; the last rect defined sits on
top. Nested items are offset from this rect's left and top
edges (meaning this rect acts as a new "mini-screen" for
coordinates for the items inside). ItemDefs can be drawn
outside the MenuDef but any interactions with when will not
work. e.g. Do not put a button outside the MenuDef
|
|
|
|
blurworld
Blurs the screen behind menu.
|
||
|
border
Sets a border type.
|
||
|
bordersize
Sets the border thickness. The border is drawn inside of
the menu rect. The origin coordinates for nested items is
shifted, meaning that "0, 0" for itemDefs changes
accordingly to avoid the border.
|
||
|
bordercolor
Sets the border color.
|
|
|
|
onOpen
Runs the provided script when the menu opens.
|
||
|
onClose
Runs the provided script when the menu closes.
|
||
|
onESC
Runs the provided script when the Escape key (ESC) is
pressed. This action usually closes the menu (by opening
another).
|
|
Name
Sets a name for the item. Manipulation of an item is done
through its name.
|
||
|
rect
Defines a rectangular area within a menu. The item's rect
is positioned relative to the menu's rect; i.e. the menu's
rect acts as a "mini-screen" for the coordinates of item
rect. This shifting eases the relocating of menus; menus can
be moved without having to recalculate the positions of its
items.
|
|
|
|
style
Fill style of the rect.
|
||
|
backcolor
Sets background color for the item when `style' is set to
WINDOW_STYLE_FILLED.
|
|
|
|
forecolor
Sets foreground color for the item. Most prominent use is
setting text color, although it also influences the color of
any alpha-valued images.
|
|
|
|
visible
Sets the visibility of the item. "0" prevents it from being
drawn, "1" (or any other value) causes it to be drawn. Can
also use a expression e.g. when(dvarString("test") ==
"text") (not supported on Menu Builder)
|
||
|
exp
Expression. This can be used for displaying parts of the
itemDef using a expression. Expressions include:
text(dvarString("")) rect X(dvarInt()) rect Y(dvarFloat()
rect W(dvarInt()) rect H(dvarFloat))
material(dvarString("))
|
||
|
border
Sets a border style for the item.
|
||
|
bordersize
Sets the thickness of the border. The border is drawn on
the inside of the item rect.
|
||
|
bordercolor
Sets border color.
|
|
|
|
type
Sets the item type. If not specified, the default is
ITEM_TYPE_TEXT.
|
||
|
text
Sets the item type. If not specified, the default is
ITEM_TYPE_TEXT.
|
||
|
textscale
Scale the text size. A scale of 1.0 is 48 pixels tall
(textscale = height / 48).
|
||
|
textstyle
Specifies a special effect to the text.
|
||
|
textalign
Determines where the horizontal alignment point is applied
to text.
|
||
|
textalignx
Horizontal text alignment in pixels (of 640 max) from left
edge of rect to alignment point of text.
|
||
|
textaligny
Vertical text alignment in pixels (of 480 max) from top
edge of rect to bottom of text.
|
||
|
background
Provided string is taken as a shader name or image file to
display as the item's background, confined within the item
rect. Rect's `style' has to be set to WINDOW_STYLE_SHADER.
The background image is scaled, ignoring aspect ratios, to
fill the rect.
|
||
|
action
Runs the provided script when the mouse clicks in/on the
item rect or when the Enter key is pressed while item has
focus.
|
||
|
onFocus
The given script is run when the item gets focus.
|
||
|
leaveFocus
The provided script is run when the item loses focus.
|
||
|
mouseEnter
Runs the provided script when the mouse enter the item's
rect.
|
||
|
mouseExit
Runs the provided script when the mouse leaves the item's
rect.
|
||
|
decoration
Disable decoration for buttons
|