Class: UI::Shop::ItemList
Overview
List of items in the UI
Defined Under Namespace
Classes: ListButton
Constant Summary collapse
- AMOUNT =
Number of button in the list
3
- BUTTON_OFFSET =
Offset between each button
38
- ACTIVE_OFFSET =
Offset between active button & inative button
-14 # Base X coordinate
- BASE_X =
Base X coordinate
128
- BASE_Y =
Base Y coordinate
30
Instance Attribute Summary collapse
-
#index ⇒ Integer
Index of the current active item.
Instance Method Summary collapse
-
#done? ⇒ Boolean
Test if the animation is done.
-
#initialize(viewport) ⇒ ItemList
constructor
Create a new ButtonList.
-
#item_list=(list)
Set the item list.
-
#item_price=(list)
Set the price list.
-
#mouse_delta_index ⇒ Integer
Return the delta index with mouse position.
-
#move_down
Move all the buttons down.
-
#move_up
Move all the buttons up.
-
#update
Update the animation.
Constructor Details
#initialize(viewport) ⇒ ItemList
Create a new ButtonList
138 139 |
# File 'docs/4_Systems_203_Shop.rb', line 138 def initialize() end |
Instance Attribute Details
#index ⇒ Integer
Returns index of the current active item.
135 136 137 |
# File 'docs/4_Systems_203_Shop.rb', line 135 def index @index end |
Instance Method Details
#done? ⇒ Boolean
Test if the animation is done
145 146 |
# File 'docs/4_Systems_203_Shop.rb', line 145 def done? end |
#item_list=(list)
Set the item list
159 160 |
# File 'docs/4_Systems_203_Shop.rb', line 159 def item_list=(list) end |
#item_price=(list)
Set the price list
163 164 |
# File 'docs/4_Systems_203_Shop.rb', line 163 def item_price=(list) end |
#mouse_delta_index ⇒ Integer
Return the delta index with mouse position
167 168 |
# File 'docs/4_Systems_203_Shop.rb', line 167 def mouse_delta_index end |
#move_down
Move all the buttons down
155 156 |
# File 'docs/4_Systems_203_Shop.rb', line 155 def move_down end |
#move_up
Move all the buttons up
152 153 |
# File 'docs/4_Systems_203_Shop.rb', line 152 def move_up end |
#update
Update the animation
141 142 |
# File 'docs/4_Systems_203_Shop.rb', line 141 def update end |