Skip to content

luxe: ui/scroll.control


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

no docs found

var units : Float2 = [32, 32]
import "luxe: ui/scroll.control" for UIScroll

no docs found

UIScroll.create(ui : Entity) : Control

no docs found

UIScroll.add(scroll : Control, control : Control) : None

Add a given control to the scroll area

UIScroll.remove(scroll : Control, control : Control) : None

Remove a given control from the scroll area

UIScroll.count(scroll : Control) : Num

Get the number of controls in the scroll

UIScroll.clear(scroll : Control, action : UIClearAction) : None

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

UIScroll.get(scroll : Control, index : Num) : Control

Get the control at the given index inside the scroll

UIScroll.index(scroll : Control, control : Control) : Num

Get the index of the given control inside the scroll

UIScroll.refresh(scroll : Control) : None

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

UIScroll.set_percent(scroll : Control, vertical : Num, horizontal : Num) : None

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

UIScroll.set_scroll(scroll : Control, vertical : Num, horizontal : Num) : None

Returns the amount of scroll in absolute units

UIScroll.set_percent_v(scroll : Control, vertical : Num) : None

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

UIScroll.set_percent_h(scroll : Control, horizontal : Num) : None

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

UIScroll.set_scroll_v(scroll : Control, vertical : Num) : None

Sets the vertical amount of scroll in absolute units

UIScroll.set_scroll_h(scroll : Control, horizontal : Num) : None

Sets the horizontal amount of scroll in absolute units

UIScroll.get_percent_v(scroll : Control) : Num

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

UIScroll.get_percent_h(scroll : Control) : Num

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

UIScroll.get_scroll_v(scroll : Control) : Num

Returns the vertical amount of scroll in absolute units

UIScroll.get_scroll_h(scroll : Control) : Num

Returns the horizontal amount of scroll in absolute units

UIScroll.can_scroll_v(scroll : Control) : Bool

Returns true if there’s any space to scroll vertically

UIScroll.can_scroll_h(scroll : Control) : Bool

Returns true if there’s any space to scroll horizontally