class

GSDL::UI::Dropdown

Inherits GSDL::UI::Container < GSDL::UI::Element < Reference < Object

Constructors

new(options : Array(String), initial_index : Int32 = 0, width : Int32 = FitContent, height : Int32 = 32, x : Int32 = 0, y : Int32 = 0, anchor : Anchor = Anchor::TopLeft, header_background_color : Color | String = "#1e1e24", list_background_color : Color | String = "#121214", hover_background_color : Color | String = "#4f46e5", text_color : Color | String = "#f4f4f5", on_change : Proc(String, Int32, Nil) | Nil = nil, padding : SpacingInput = 0, margin : SpacingInput = 0, flex : UInt8 = 0_u8)
Source
new(*args, **kwargs)
Source
new(*args, **kwargs, &)
Source

Instance methods

close_menu!
Source
contains_point?(mx : Int32, my : Int32) : Bool
Source
draw(draw : Draw)
Source
header_background_color
Source
header_background_color=(header_background_color : Color)
Source
height
Source
hover_background_color
Source
hover_background_color=(hover_background_color : Color)
Source
layout!
Source
list_background_color
Source
list_background_color=(list_background_color : Color)
Source
on_change
Source
on_change=(on_change : Proc(String, Int32, Nil) | Nil)
Source
open_menu!
Source
opened=(opened : Bool)
Source
opened?
Source
options
Source
options=(new_options : Array(String))
Source
selected_index
Source
selected_index=(index : Int32)
Source
selected_option
Source
text_color
Source
text_color=(text_color : Color)
Source
update(dt : Float32)
Source
width
Source