Class: UI::Storage::PokemonIcon
- Inherits:
-
PokemonIconSprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- SpriteSheet
- PokemonIconSprite
- UI::Storage::PokemonIcon
- Defined in:
- scripts/01450 Systems/00200 Storage/00002 UI_Storage/00201 PokemonIcon.rb
Instance Attribute Summary
Attributes inherited from SpriteSheet
Attributes inherited from LiteRGSS::ShaderedSprite
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
-
#data=(box)
Set the box data.
-
#initialize(viewport, index) ⇒ PokemonIcon
constructor
A new instance of PokemonIcon.
-
#simple_mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Boolean
Tell if the mouse is in the sprite.
Methods inherited from PokemonIconSprite
Methods inherited from SpriteSheet
Methods inherited from Sprite
#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #translate_mouse_coords, #update
Methods inherited from LiteRGSS::Sprite
new, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport, index) ⇒ PokemonIcon
Returns a new instance of PokemonIcon.
4 5 6 7 |
# File 'scripts/01450 Systems/00200 Storage/00002 UI_Storage/00201 PokemonIcon.rb', line 4 def initialize(, index) super(, false) @index = index end |
Instance Method Details
#data=(box)
Set the box data
11 12 13 |
# File 'scripts/01450 Systems/00200 Storage/00002 UI_Storage/00201 PokemonIcon.rb', line 11 def data=(box) super(box.content[@index]) end |
#simple_mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Boolean
Tell if the mouse is in the sprite
16 17 18 19 |
# File 'scripts/01450 Systems/00200 Storage/00002 UI_Storage/00201 PokemonIcon.rb', line 16 def simple_mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) mx, my = translate_mouse_coords(mouse_x, mouse_y) return mx.between?(0, 31) && my.between?(0, 31) end |