~~NOTOC~~ <=[[4rpl:start| Index]] * [[4rpl:commands:GetUnitUIText|Get]] * [[4rpl:commands:SetUnitUIText|Set]] ====== GetUnitUIText ====== GetUnitUIText(<-unit <-slot) ->text ===== Description ===== Gets the string UI text 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 a text.. For the Label and Button widgets the text is what is shown on the widget.\\ For the Flip and Choice widget, the text is the label and the value is controlled by the state.\\ \\ Notes: * This call only works on custom units. If used on a built in unit, it will return 0. * Unless the value is explicitly set using [[SetUnitUIText]] a null value will be returned. ===== 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 GetUnitUIText(self <-_DATA) ->slotText printallsp("UICALLBACK: " <-slotText) <=[[4rpl:start| Index]]