menu GetDef
New controls take their font, colours, alignment and parent from a set of defaults. menu GetDef puts one
of them into #MenuRes; menu SetDef changes them.
| Key | What it is | Set too by |
|---|---|---|
alignment |
0 left, 1 right, 2 centre | menu Font Align |
color |
Background colour | menu Font BgColor |
fontcolor |
Text colour | menu Font Color |
fontname |
Font | menu Font Name |
fontsize |
Font size in points | menu Font Size |
fontstyle |
Sum of 1 bold, 2 italic, 4 underline, 8 strike-out | menu Font Style |
parent |
Name of the window or panel new controls go into | menu Form, menu Panel |
When a script starts, and after menu Clear, they are Arial 10, plain, black text
on the standard button colour (-16777201), aligned left, in form0, the main window.
Example
Section titled “Example”menu GetDef fontnameset %font #MenuResmenu GetDef fontsizedisplay ok New controls use %font #MenuReshaltparentafter the default window or panel was deleted gives the last text anymenu GetPropormenu GetDefreturned: the default parent is then none, and new controls do not appear untilmenu SetDef parentnames one.
See also
The EasyUO 1.6 behaviour on this page was researched with help from the ScriptUO community: Gaderian's tutorial New Menu Code and how to adapt old scripts and the scripts its members share at scriptuo.com.