Class: UI::Shop::ScrollBar

Inherits:
UI::SpriteStack show all
Defined in:
docs/4_Systems_203_Shop.rb

Overview

UI element showing the scrollbar of the shop

Constant Summary collapse

HEIGHT =

Number of pixel the scrollbar use to move the button

90
BASE_Y =

Base Y for the scrollbar

33

Constants inherited from UI::SpriteStack

UI::SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from UI::SpriteStack

#animated, #data, #moving, #stack, #viewport, #x, #y

Instance Method Summary collapse

Methods inherited from UI::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

Parameters:



279
280
# File 'docs/4_Systems_203_Shop.rb', line 279

def initialize(viewport)
end

Instance Attribute Details

#indexInteger

Returns current index of the scrollbar.

Returns:

  • (Integer)

    current index of the scrollbar



270
271
272
# File 'docs/4_Systems_203_Shop.rb', line 270

def index
  @index
end

#max_indexInteger

Returns number of possible indexes.

Returns:

  • (Integer)

    number of possible indexes



272
273
274
# File 'docs/4_Systems_203_Shop.rb', line 272

def max_index
  @max_index
end