class GSF::MenuItem

Defined in:

gsf/menu_item.cr

Constructors

Instance Method Summary

Constructor Detail

def self.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) #

[View source]

Instance Method Detail

def blur #

[View source]
def draw(window : SF::RenderWindow, x_offset = 0, y_offset = 0) #

[View source]
def focus #

[View source]
def focused? : Bool #

[View source]
def hover?(mouse : Mouse) #

TODO this is probably broken if draw x_offset or y_offset is used


[View source]
def key : String #

[View source]
def label : String #

[View source]
def text : SF::Text #

[View source]
def text_color : SF::Color #

[View source]
def text_color_focused : SF::Color #

[View source]
def update(frame_time : Float32) #

[View source]
def x : Int32 | Float32 #

[View source]
def y : Int32 | Float32 #

[View source]