menu PushDef
menu PushDef saves a copy of the defaults new controls are created with: the
font, the colour and the parent. menu PopDef brings a saved copy back.
Example
Section titled “Example”menu Window Size 300 70menu PushDefmenu Font Style bmenu Panel header 0 0 300 30menu Text title 5 5 Settingsmenu PopDefmenu Text body 5 40 Plain text, in the main window againmenu ShowhaltThese are quirks of EasyUO 1.6, kept as they are:
- The alignment is not saved: after
menu PopDefit is left. - Copies are added at the end of a list and
menu PopDeftakes the first one, so nested pairs come back in the wrong order. Use onemenu PushDef/menu PopDefpair at a time.
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.