Class: UI::Bag::PocketList
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Bag::PocketList
- Defined in:
- docs/4_Systems_103_Bag.rb
Overview
Utility showing the pocket list
Constant Summary collapse
- ACTIVE_BASE_COORDINATES =
Base coordinate of the active items
[0, 192]
- INACTIVE_BASE_COORDINATES =
Base coordinate of the inactive items
[0, 198]
- OFFSET_X =
Offset between each sprites
20
- POCKET_TRANSLATION =
Array translating real pocket id to sprite piece
[0, 0, 1, 3, 5, 4, 2, 6, 7]
- ACTIVE_IMAGE =
Name of the active image
'bag/pockets_active'
- INACTIVE_IMAGE =
Name of the inactive image
'bag/pockets_inactive'
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#index ⇒ Integer
Index of the current selected pocket.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport, pocket_indexes) ⇒ PocketList
constructor
Create a new pocket list.
Methods inherited from SpriteStack
#[], #add_background, #add_line, #add_text, #anime, #anime_delta_set, #dispose, #each, #execute_anime, #move, #move_to, #opacity, #opacity=, #push, #push_sprite, #set_origin, #set_position, #simple_mouse_in?, #size, #stop_animation, #translate_mouse_coords, #update, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport, pocket_indexes) ⇒ PocketList
Create a new pocket list
158 159 |
# File 'docs/4_Systems_103_Bag.rb', line 158 def initialize(, pocket_indexes) end |
Instance Attribute Details
#index ⇒ Integer
Returns index of the current selected pocket.
142 143 144 |
# File 'docs/4_Systems_103_Bag.rb', line 142 def index @index end |