Class: UI::Bag::ScrollBar
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Bag::ScrollBar
- Defined in:
- docs/4_Systems_103_Bag.rb
Overview
Scrollbar UI element for the bag
Constant Summary collapse
- HEIGHT =
Number of pixel the scrollbar use to move the button
160
- BASE_Y =
Base Y for the scrollbar
36
- BASE_X =
BASE X for the scrollbar
309
- BACKGROUND =
Background of the scrollbar
'bag/scroll'
- BUTTON =
Image of the button
'bag/button_scroll'
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#index ⇒ Integer
Current index of the scrollbar.
-
#max_index ⇒ Integer
Number of possible indexes.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport) ⇒ ScrollBar
constructor
Create a new scrollbar.
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) ⇒ ScrollBar
Create a new scrollbar
217 218 |
# File 'docs/4_Systems_103_Bag.rb', line 217 def initialize() end |
Instance Attribute Details
#index ⇒ Integer
Returns current index of the scrollbar.
202 203 204 |
# File 'docs/4_Systems_103_Bag.rb', line 202 def index @index end |
#max_index ⇒ Integer
Returns number of possible indexes.
204 205 206 |
# File 'docs/4_Systems_103_Bag.rb', line 204 def max_index @max_index end |