GUI library for ocaml, with animations, based on SDL2
Library bogue
Module Bogue . Select
Dependency graph
val create : ?dst:Layout.t -> ?name:string -> ?action:( int -> unit ) -> ?fg:Draw.color -> string array -> int -> Layout.t

create string_array i creates a select box with preselected entry i. For instance create [| "A"; "B"; "C" |] 1 will create a select box with default choice "B". The action (if specified) is executed when an item is selected, and takes as argument the index of the selected item.

  • returns

    a layout showing the selected item.