A labelled dropdown row: label left, value box right. Clicking the box opens a scrollable
popup list on UIRoot.popupLayer behind a click-blocking backdrop, so nothing underneath can
be interacted with while it is open (Escape or an outside click closes it). display entries
override row labels while items holds the raw values delivered to onSelect.
Constructor
new(label:String, width:Float, ?onSelect:(index:Int, value:String) ‑> Void)
Parameters:
label | the row text on the left |
|---|---|
width | layout width (the value box sits at the right edge) |
onSelect | fired when the user picks an entry |
Variables
Methods
localize(key:String, fallback:String):Void
Switches the label to a localized string.
Parameters:
key | the translation key |
|---|---|
fallback | the source-language text |
select(index:Int):Void
Programmatically selects an index without firing onSelect.
Parameters:
index | the entry to select (ignored when out of range) |
|---|
setItems(items:Array<String>, ?display:Array<String>):Void
Sets the entries, keeping the selection when possible.
Parameters:
items | the raw values delivered to |
|---|---|
display | optional per-entry labels shown instead of the raw values |