struct

CryTUI::Widgets::List

Inherits Struct < Value < Object

Constructors

new(items : Array(CryTUI::Widgets::ListItem), style : CryTUI::Style = Style.new, highlight_style : CryTUI::Style = Style.new, block : CryTUI::Widgets::Block | Nil = nil)
Source

Class methods

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.

Source

Instance methods

block
Source
highlight_style
Source
items
Source
render(area : Rect, buffer : Buffer, state : ListState)
Source
style
Source