Class: UI::Quest::ScrollBar
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Quest::ScrollBar
- Defined in:
- scripts/01450 Systems/08000 Quest/00002 UI_Quest/00060 ScrollBar.rb
Constant Summary collapse
- HEIGHT =
Number of pixel the scrollbar use to move the button
153
- BASE_Y =
Base Y for the scrollbar
38
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
15 16 17 18 19 20 21 |
# File 'scripts/01450 Systems/08000 Quest/00002 UI_Quest/00060 ScrollBar.rb', line 15 def initialize() super(, 310, BASE_Y) add_background('quest/scroll') @button = add_sprite(-1, 0, 'quest/button_scroll') @index = 0 @max_index = 1 end |
Instance Attribute Details
#index ⇒ Integer
Returns current index of the scrollbar.
5 6 7 |
# File 'scripts/01450 Systems/08000 Quest/00002 UI_Quest/00060 ScrollBar.rb', line 5 def index @index end |
#max_index ⇒ Integer
Returns number of possible indexes.
7 8 9 |
# File 'scripts/01450 Systems/08000 Quest/00002 UI_Quest/00060 ScrollBar.rb', line 7 def max_index @max_index end |