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, #font_id, #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
207 208 |
# File 'docs/4_Systems_203_Shop.rb', line 207 def initialize(, index) end |
Instance Attribute Details
#index ⇒ Integer
Returns Index of the button in the list.
203 204 205 |
# File 'docs/4_Systems_203_Shop.rb', line 203 def index @index end |
Instance Method Details
#active? ⇒ Boolean
Is the button active
210 211 |
# File 'docs/4_Systems_203_Shop.rb', line 210 def active? end |
#icon_data=(icon)
Set the item icon
222 223 |
# File 'docs/4_Systems_203_Shop.rb', line 222 def icon_data=(icon) end |
#price=(price)
Set the item price
218 219 |
# File 'docs/4_Systems_203_Shop.rb', line 218 def price=(price) end |
#reset
Reset the button coordinate
225 226 |
# File 'docs/4_Systems_203_Shop.rb', line 225 def reset end |
#text=(text)
Set the button text
214 215 |
# File 'docs/4_Systems_203_Shop.rb', line 214 def text=(text) end |