Skip to main content
CrystalDocs
Search documentation
Search
Browse Docs
CrystalShards
About
class
GSF::MenuItem
Inherits
Reference
<
Object
Constructors
new
(x :
Float32
|
Int32
, y :
Float32
|
Int32
, label :
String
, key :
String
, font :
SF::Font
, size = 72, text_color :
SF::Color
=
SF::Color::White
, text_color_focused :
SF::Color
=
SF::Color::Green
, focused :
Bool
= false, centered = true)
Source
Instance methods
blur
Source
draw
(window :
SF::RenderWindow
, x_offset = 0, y_offset = 0)
Source
focus
Source
focused?
Source
hover?
(mouse :
Mouse
)
TODO: this is probably broken if draw x_offset or y_offset is used
Source
key
Source
label
Source
text
Source
text_color
Source
text_color_focused
Source
update
(frame_time :
Float32
)
Source
x
Source
y
Source