bogue
GUI library for ocaml, with animations, based on SDL2
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Dependency graph
Avar creation
val create :
?duration:Time.t ->
?init:callback ->
?ending:callback ->
?finished:bool ->
?update:( 'a t -> float -> 'a ) ->
'a ->
'a t
Generic Avar creation. If finished = true
, the var never gets further updated, ie behaves like a normal variable. Otherwise, the update
parameter is compulsory.
fromto x1 x2
creates a integer Avar.t with initial value x1
and, as time elapses, moves continuously to x2
, with a final slowdown.
val var : 'a -> 'a t
Create an Avar which behaves like a normal Var (no animation).
Avar information
val get : 'a t -> 'a
Start the animation (if necessary) and compute the current value of the variable.
val progress : 'a t -> float
progress v
is a float in [0,1] giving the percentage of the animation when the last v.value
was computed. In case of infinite animation, this is just the elapsed Time (in ms).