Combobox
Classes
Class: Combobox
Extends Widget
A
Comboboxwidget is a dropdown selection control that can be editable with autocomplete filters or read-only with predefined dropdown list. Usually consists of a editbox (or selector button) + toggle button + dropdown list.Dependencies:
Field: toggle
Button
Dropdown open/close button
Field: dropdown
ScrollListbox
The dropdown for the Combobox.
Field: selector
X2Editbox
The input exitbox if the Combobox is editable.
Field: selectorBtn
Button
The input button if the Combobox is not editable.
Method: SetEditable
(method) Combobox:SetEditable(editable: boolean)
Enables or disables editability of the Combobox. If set to
falseany guide text set toCombobox.selectorwill not render.@param
editable—trueto allow editing,falseto disable. (default:false)
Method: SetAutocomplete
(method) Combobox:SetAutocomplete(type: "appellation"|"ingameShopGoods"|"item"|"itemForDebug"|"itemTypeForDebug"...(+1), filter: string)
Sets the autocomplete type and filter for the Combobox.
Combobox:SetEditablemust be set totrue.@param
type— The autocomplete type.@param
filter— The autocomplete filter.type: | "appellation" | "ingameShopGoods" | "item" | "itemForDebug" | "itemTypeForDebug" | "store"
Method: SetDropdownVisibleLimit
(method) Combobox:SetDropdownVisibleLimit(limit: number)
Sets the maximum number of visible items in the Combobox dropdown.
@param
limit— The maximum number of visible items (min:0). (default:10)
Method: PauseAutocomplete
(method) Combobox:PauseAutocomplete(pause: boolean)
Pauses or unpauses autocomplete functionality for the Combobox.
@param
pause—trueto pause autocomplete,falseto unpause.
Method: Insert
(method) Combobox:Insert(datas: ItemTree[])
Inserts data into the Combobox dropdown.
@param
datas— The data to insert into the dropdown.See: ItemTree
Class: ScrollListbox
Extends Listbox
Field: downBtn
Button
A
Buttonwidget is clickable and responds to mouse interaction with four visual states: normal, highlighted (hover), pushed (pressed), and disabled. Supports per-state custom backgrounds, tint colors, text coloring, auto-resize, content insets, and per-mouse-button click registration.Dependencies:
- TextStyle used for the
stylefield.- EffectDrawable used for getting the background state drawable.
- ImageDrawable used for getting the background state drawable.
- NinePartDrawable used for getting the background state drawable.
- ThreePartDrawable used for getting the background state drawable.
Field: upBtn
Button
A
Buttonwidget is clickable and responds to mouse interaction with four visual states: normal, highlighted (hover), pushed (pressed), and disabled. Supports per-state custom backgrounds, tint colors, text coloring, auto-resize, content insets, and per-mouse-button click registration.Dependencies:
- TextStyle used for the
stylefield.- EffectDrawable used for getting the background state drawable.
- ImageDrawable used for getting the background state drawable.
- NinePartDrawable used for getting the background state drawable.
- ThreePartDrawable used for getting the background state drawable.
Field: vslider
Vslider
Class: Vslider
Extends Slider
Field: thumb
Button
A
Buttonwidget is clickable and responds to mouse interaction with four visual states: normal, highlighted (hover), pushed (pressed), and disabled. Supports per-state custom backgrounds, tint colors, text coloring, auto-resize, content insets, and per-mouse-button click registration.Dependencies:
- TextStyle used for the
stylefield.- EffectDrawable used for getting the background state drawable.
- ImageDrawable used for getting the background state drawable.
- NinePartDrawable used for getting the background state drawable.
- ThreePartDrawable used for getting the background state drawable.