class Tradify::Button

Defined in:

tradify/button.cr

Constant Summary

DEFAULT_COLOR = LibRay::WHITE
DISABLED_COLOR = LibRay::Color.new(r: 70, g: 70, b: 70, a: 255)
FONT_SIZE = 20
HOVERED_COLOR = LibRay::GREEN
PADDING = 15
SPACING = 3

Constructors

Instance Method Summary

Instance methods inherited from class Tradify::Component

components : Array(Component) components, components=(components : Array(Component)) components=, draw(px, py)
draw
draw
, height : Int32 height, height=(height : Int32) height=, hidden? : Bool hidden?, hide hide, show show, shown? shown?, update(px, py)
update
update
, width : Int32 width, width=(width : Int32) width=, x : Int32 x, x=(x : Int32) x=, y : Int32 y, y=(y : Int32) y=

Constructor methods inherited from class Tradify::Component

new(x : Int32 = 0, y : Int32 = 0, width : Int32 = 0, height : Int32 = 0, components : Array(Tradify::Component) = [] of Component) new

Constructor Detail

def self.new(game : Game, x, y, text : String, click : Proc(Bool) = -> do false end, padding : Int32 = PADDING) #

[View source]

Instance Method Detail

def click #

[View source]
def color #

[View source]
def disable #

[View source]
def disabled? : Bool #

[View source]
def draw(px, py) #

[View source]
def enable #

[View source]
def enabled? #

[View source]
def hovered? : Bool #

[View source]
def over?(px, py, mouse) #

[View source]
def padding : Int32 #

[View source]
def remeasure #

[View source]
def text : String #

[View source]
def text=(text : String) #

[View source]
def update(px, py) #

[View source]