Class: UI::TeamButton

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

Overview

Button that show basic information of a Pokemon

Constant Summary collapse

CoordinatesY =

List of the Y coordinate of the button (index % 6), relative to the contents definition !

[0, 24, 64, 88, 128, 152]
CoordinatesX =

List of the X coordinate of the button (index % 2), relative to the contents definition !

[0, 160]
TextureBackgroundY =

List of the Y coordinate of the background textures

[0, 56, 112, 168]
TextureBackgroundHeight =

Height of the background texture

56

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from SpriteStack

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

Instance Method Summary collapse

Methods inherited from 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) ⇒ TeamButton

Create a new Team button

Parameters:

  • viewport (Viewport)

    viewport where to show the button

  • index (Integer)

    Index of the button in the team



395
396
# File 'docs/01450_Systems_00102_Party.rb', line 395

def initialize(viewport, index)
end

Instance Attribute Details

#item_textSymText (readonly)

Get the Item text to perform specific operations

Returns:



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

def item_text
  @item_text
end

#selectedBoolean

Get the selected state of the sprite

Returns:

  • (Boolean)


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

def selected
  @selected
end

Instance Method Details

#data=(data)

Set the data of the SpriteStack

Parameters:



399
400
# File 'docs/01450_Systems_00102_Party.rb', line 399

def data=(data)
end

#hide_item_name

Hide the item name



412
413
# File 'docs/01450_Systems_00102_Party.rb', line 412

def hide_item_name
end

#refresh

Refresh the button



415
416
# File 'docs/01450_Systems_00102_Party.rb', line 415

def refresh
end

#show_item_name

Show the item name



409
410
# File 'docs/01450_Systems_00102_Party.rb', line 409

def show_item_name
end

#update_background

Update the background according to the selected state



402
403
# File 'docs/01450_Systems_00102_Party.rb', line 402

def update_background
end

#update_graphics

Update the graphics



418
419
# File 'docs/01450_Systems_00102_Party.rb', line 418

def update_graphics
end