Class: UI::TeamButton

Inherits:
SpriteStack show all
Defined in:
scripts/01300 UI/09000 Others/02000 UI__TeamButton.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

Instance Attribute Details

#item_textSymText (readonly)

Get the Item text to perform specific operations

Returns:

#selectedBoolean

Get the selected state of the sprite

Returns:

  • (Boolean)

Instance Method Details

#data=(data)

Set the data of the SpriteStack

Parameters:

#hide_item_name

Hide the item name

#refresh

Refresh the button

#show_item_name

Show the item name

#update_background

Update the background according to the selected state

#update_graphics

Update the graphics