User Tools

Site Tools


4rpl:commands:getunituioptions

Index

GetUnitUIOptions

GetUnitUIOptions(<-unit <-slot) ->optionsList

Description

Gets the list of options for a given UI control slot. Custom units can have UI configuration widgets. These are configured in the CPack manager. Each widget occupies a slot, 0-7. Each widget also has options. For the Label and Button widgets the options are empty.
For the Flip and Choice widget, the options are the values shown in the control.

Note that this call only works on custom units. If used on a built in unit, it will return 0.

Examples

#:_UICALLBACK is called on any script (if present) whenever a UI widget is changed.
:_UICALLBACK
   #The _DATA is an int that points to the slot that was just changed
   GetUnitUIOptions(self <-_DATA) ->slotOptions
   printallsp("UICALLBACK: " <-slotOptions)

Index

4rpl/commands/getunituioptions.txt · Last modified: 2021/01/24 14:49 by Sanian