Class: UI::Shop::ItemList::ListButton
- Inherits:
-
UI::SpriteStack
- Object
- UI::SpriteStack
- UI::Shop::ItemList::ListButton
- Defined in:
- docs/4_Systems_203_Shop.rb
Overview
Button for an item in the list
Constant Summary
Constants inherited from UI::SpriteStack
UI::SpriteStack::NO_INITIAL_IMAGE
Instance Attribute Summary collapse
-
#index ⇒ Integer
Index of the button in the list.
Attributes inherited from UI::SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#active? ⇒ Boolean
Is the button active.
-
#icon_data=(icon)
Set the item icon.
-
#initialize(viewport, index) ⇒ ListButton
constructor
Create a new Item sell button.
-
#price=(price)
Set the item price.
-
#reset
Reset the button coordinate.
-
#text=(text)
Set the button text.
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, index) ⇒ ListButton
Create a new Item sell button
206 207 |
# File 'docs/4_Systems_203_Shop.rb', line 206 def initialize(, index) end |
Instance Attribute Details
#index ⇒ Integer
Returns Index of the button in the list.
202 203 204 |
# File 'docs/4_Systems_203_Shop.rb', line 202 def index @index end |
Instance Method Details
#active? ⇒ Boolean
Is the button active
209 210 |
# File 'docs/4_Systems_203_Shop.rb', line 209 def active? end |
#icon_data=(icon)
Set the item icon
221 222 |
# File 'docs/4_Systems_203_Shop.rb', line 221 def icon_data=(icon) end |
#price=(price)
Set the item price
217 218 |
# File 'docs/4_Systems_203_Shop.rb', line 217 def price=(price) end |
#reset
Reset the button coordinate
224 225 |
# File 'docs/4_Systems_203_Shop.rb', line 224 def reset end |
#text=(text)
Set the button text
213 214 |
# File 'docs/4_Systems_203_Shop.rb', line 213 def text=(text) end |