module Config:sig
..end
Config
contains the config
type, used for providing configuration and
input information to the sketch, and utility functions for accessing
information from a config.
typekeys =
Stdlib.Set.Make(Stdlib.Uchar).t
type
config = {
|
width : |
|
height : |
|
display_width : |
|
display_height : |
|
mouse_x : |
|
mouse_y : |
|
pmouse_x : |
|
pmouse_y : |
|
mouse_scroll : |
|
mouse_pressed : |
|
: |
|
key : |
|
keys : |
|
key_unicode : |
|
key_pressed : |
|
frame_count : |
|
frame_rate : |
}
val check_key : config -> char -> bool
check_key config char
is true
if the key char
is pressed in config
and false
otherwise.
val check_key_uchar : config -> Stdlib.Uchar.t -> bool
check_key_uchar config char
is true
if the key char
is pressed in
config
and false
otherwise. Supports unicode characters.
val get_keys : config -> char list
get_keys config
is the list of all keys that are currently pressed in
config
, or []
if there are no keys pressed. Only includes keys that
are valid ASCII char values.
val get_keys_uchar : config -> Stdlib.Uchar.t list
key_keys_uchar config
is the list of all keys that are currently pressed
in config
, or []
if there are no keys pressed. Includes all keys,
represented as Unicode characters.
exception Exit
Exit
may be raised to terminate the sketch.