struct
CryTUI::Widgets::List
- CryTUI::Widgets::List
- Struct
- Value
- Object
Defined in:
crytui/widgets.crConstructors
Class Method Summary
-
.visible_offset(heights : Array(Int32), selected : Int32 | Nil, height : Int32, offset : Int32 = 0) : Int32
The index of the first item the list will draw, from the item heights, the selection, and the rows available.
Instance Method Summary
- #block : Block | Nil
- #highlight_style : Style
- #items : Array(ListItem)
- #render(area : Rect, buffer : Buffer, state : ListState)
- #style : Style
Constructor Detail
def self.new(items : Array(CryTUI::Widgets::ListItem), style : CryTUI::Style = Style.new, highlight_style : CryTUI::Style = Style.new, block : CryTUI::Widgets::Block | Nil = nil)
#
Class Method Detail
def self.visible_offset(heights : Array(Int32), selected : Int32 | Nil, height : Int32, offset : Int32 = 0) : Int32
#
The index of the first item the list will draw, from the item heights, the selection, and the rows available. Anything that needs to know where an item ended up on screen -- hit testing, most obviously -- has to reach the same answer the renderer did, so both come through here.