Class: UI::Shop::PkmList::ListButtonPkm

Inherits:
UI::SpriteStack show all
Defined in:
docs/01450_Systems_00203_Shop.rb

Overview

Button for a Creature in the list

Constant Summary

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, index) ⇒ ListButtonPkm

Create a new Item sell button

Parameters:

  • viewport (Viewport)

    the viewport in which the SpriteStack will be displayed

  • index (Integer)


374
375
# File 'docs/01450_Systems_00203_Shop.rb', line 374

def initialize(viewport, index)
end

Instance Attribute Details

#indexInteger

Returns Index of the button in the list.

Returns:

  • (Integer)

    Index of the button in the list



370
371
372
# File 'docs/01450_Systems_00203_Shop.rb', line 370

def index
  @index
end

Instance Method Details

#active?Boolean

Is the button active

Returns:

  • (Boolean)


377
378
# File 'docs/01450_Systems_00203_Shop.rb', line 377

def active?
end

#icon_data=(pkm_hash)

Set the item icon

Parameters:

  • pkm_hash (Hash)

    the Pokemon hash for the icon



389
390
# File 'docs/01450_Systems_00203_Shop.rb', line 389

def icon_data=(pkm_hash)
end

#price=(text)

Set the price text of the button

Parameters:

  • text (String, nil)

    set nil to hide



385
386
# File 'docs/01450_Systems_00203_Shop.rb', line 385

def price=(text)
end

#reset

Reset the button coordinate



392
393
# File 'docs/01450_Systems_00203_Shop.rb', line 392

def reset
end

#text=(text)

Set the button text

Parameters:

  • text (String, nil)

    the item name



381
382
# File 'docs/01450_Systems_00203_Shop.rb', line 381

def text=(text)
end