Skip to content

luxe: ui/list.control


import "luxe: ui/list.control" for Data

no docs found

import "luxe: ui/list.control" for UIList

no docs found

UIList.create(ui_entity : Entity) : Control

Create a list control

UIList.add(list : Control, control : Control) : None

Add a given control to the list

UIList.remove(list : Control, control : Control) : None

Remove a given control from the list

UIList.clear(list : Control, action : UIClearAction) : None

Clear the list, with the given action to do with the removed controls

UIList.refresh(list : Control) : None

Refresh the list, called after changes (is this still needed?)

UIList.set_flex_width(list : Control, state : Bool) : None

Sets whether the control will expand to fill horizontal space. Typically you want this in flex layout.

UIList.set_percent(list : Control, vertical : Num, horizontal : Num) : unknown

Sets the amount of scroll in relative percent, 0…1

UIList.set_percent_v(list : Control, vertical : Num) : unknown

Sets the vertical amount of scroll in relative percent, 0…1

UIList.set_percent_h(list : Control, horizontal : Num) : unknown

Sets the horizontal amount of scroll in relative percent, 0…1

UIList.get_percent_v(list : Control) : Num

Returns the vertical amount of scroll in relative percent, 0…1

UIList.get_percent_h(list : Control) : Num

Returns the horizontal amount of scroll in relative percent, 0…1

UIList.set_scroll(list : Control, vertical : Num, horizontal : Num) : None

Returns the amount of scroll in absolute units

UIList.set_scroll_v(list : Control, vertical : Num) : None

Sets the vertical amount of scroll in absolute units

UIList.set_scroll_h(list : Control, horizontal : Num) : None

Sets the horizontal amount of scroll in absolute units

UIList.get_scroll_v(list : Control) : Num

Returns the vertical amount of scroll in absolute units

UIList.get_scroll_h(list : Control) : Num

Returns the horizontal amount of scroll in absolute units

UIList.can_scroll_v(list : Control) : Bool

Returns true if there’s any space to scroll vertically

UIList.can_scroll_h(list : Control) : Bool

Returns true if there’s any space to scroll horizontally

UIList.count(list : Control) : Num

Get the number of controls in the list

UIList.get(list : Control, index : Num) : Control

Get the control at the given index inside the list

UIList.index(list : Control, control : Control) : Num

Get the index of the given control inside the list