abstract class Works::Item::Base

Direct Known Subclasses

Defined in:

works/item/base.cr

Constant Summary

Color = LibAllegro.map_rgb_f(1, 0, 1)
IconMargin = 4 * Screen.scale_factor
IconTextColor = LibAllegro.premul_rgba_f(1, 1, 1, 0.5)
ItemSize = Cell.size / 2
Key = :base
MaxAmount = 100
Name = "Item"
ShortCode = "IB"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.icon_color #

[View source]
def self.key #

[View source]
def self.max_amount #

[View source]
def self.name #

[View source]
def self.short_code #

[View source]
def self.sprite #

[View source]

Instance Method Detail

def add(amount) #

[View source]
def amount : Int32 #

[View source]
def clone #

[View source]
def draw_icon(x, y, size) #

[View source]
def draw_icon_amount_text(x, y, size) #

[View source]
def draw_icon_background(x, y, size) #

[View source]
def draw_icon_text(x, y, size) #

[View source]
def draw_item(cx, cy, center = true) #

[View source]
def draw_shortcode_text(x, y, size) #

[View source]
def full? #

[View source]
def icon_color #

[View source]
def key #

[View source]
def max_amount #

[View source]
def name #

[View source]
def none? #

[View source]
def print_str #

[View source]
def remove(amount) #

[View source]
def remove_as_new(amount) #

[View source]
def short_code #

[View source]
def sprite #

[View source]