Class: UI::ItemSprite

Inherits:
Sprite show all
Defined in:
scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb

Overview

Class that show the item icon

Direct Known Subclasses

Storage::PokemonItemIcon

Instance Attribute Summary

Attributes inherited from LiteRGSS::ShaderedSprite

#blendmode, #shader

Attributes inherited from LiteRGSS::Sprite

#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y

Instance Method Summary collapse

Methods inherited from Sprite

#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords, #update

Methods inherited from LiteRGSS::Sprite

new, #set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Instance Method Details

#data=(item_id)

Set the item that should be shown

Parameters:



300
301
302
303
# File 'scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb', line 300

def data=(item_id)
  item_id = item_id.db_symbol if item_id.is_a?(Studio::Item)
  set_bitmap(data_item(item_id).icon, :icon)
end