class Works::InventoryHUD
Defined in:
works/inventory_hud.cr
Constant Summary
-
BackgroundColor =
LibAllegro.premul_rgba_f(0, 0, 0, 0.13)
-
HoverColor =
LibAllegro.premul_rgba_f(1, 0.5, 0, 0.33)
-
Margin =
4 * Screen.scale_factor
-
SlotBackgroundColor =
LibAllegro.premul_rgba_f(1, 1, 1, 0.13)
-
SlotBorderColor =
LibAllegro.premul_rgba_f(0, 0, 0, 0.03)
-
SlotCols =
10
-
SlotSize =
32 * Screen.scale_factor
Constructors
Class Method Summary
Instance Method Summary
Constructor Detail
def self.
new(items : Array(
Item::Base), max_slots : Int32)
#
Class Method Detail
def self.
draw_slot(dx, dy, item :
Item::Base | Nil, hovering =
false)
#
Instance Method Detail
def
draw_slot(dx, dy, item :
Item::Base | Nil, hovering =
false)
#
def
hover_index : Int32 | Nil
#
def
update_hover(mouse :
Mouse)
#
def
update_hover_index(mouse :
Mouse)
#