Class: UI::TeamButton

Inherits:
SpriteStack show all
Defined in:
docs/4_Systems_102_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



405
406
# File 'docs/4_Systems_102_Party.rb', line 405

def initialize(viewport, index)
end

Instance Attribute Details

#item_textSymText (readonly)

Get the Item text to perform specific operations

Returns:



390
391
392
# File 'docs/4_Systems_102_Party.rb', line 390

def item_text
  @item_text
end

#selectedBoolean

Get the selected state of the sprite

Returns:

  • (Boolean)


401
402
403
# File 'docs/4_Systems_102_Party.rb', line 401

def selected
  @selected
end

Instance Method Details

#data=(data)

Set the data of the SpriteStack

Parameters:



409
410
# File 'docs/4_Systems_102_Party.rb', line 409

def data=(data)
end

#hide_item_name

Hide the item name



422
423
# File 'docs/4_Systems_102_Party.rb', line 422

def hide_item_name
end

#refresh

Refresh the button



425
426
# File 'docs/4_Systems_102_Party.rb', line 425

def refresh
end

#show_item_name

Show the item name



419
420
# File 'docs/4_Systems_102_Party.rb', line 419

def show_item_name
end

#update_background

Update the background according to the selected state



412
413
# File 'docs/4_Systems_102_Party.rb', line 412

def update_background
end

#update_graphics

Update the graphics



428
429
# File 'docs/4_Systems_102_Party.rb', line 428

def update_graphics
end