class RPG::Item

Defined in:

rpg/item.cr

Constant Summary

AmountFontSize = 10
AmountTextColor = SF::Color::White
LabelBottomPadding = 8
LabelFontSize = 12
LabelTextColor = SF::Color::White

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(key : String, name : String, fill_color : SF::Color = SF::Color.new) #

[View source]

Class Method Detail

def self.amount_text : SF::Text #

[View source]
def self.get(key : String) #

[View source]
def self.init_data #

[View source]
def self.label_text : SF::Text #

[View source]
def self.word_wrap_lines(text, width) #

[View source]

Instance Method Detail

def add #

[View source]
def amount : Int32 #

[View source]
def draw_ui(window, grid_cell_size, dx, dy, row, col) #

[View source]
def draw_ui_icon(window, radius, x, y) #

[View source]
def draw_ui_label(window, grid_cell_size, radius, x, y) #

[View source]
def empty? #

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

[View source]
def key : String #

[View source]
def name : String #

[View source]
def remove #

[View source]