Class: BattleUI::TargetSelection::Button
- Inherits:
-
UI::SpriteStack
- Object
- UI::SpriteStack
- BattleUI::TargetSelection::Button
- Defined in:
- docs/5_Battle_01_Scene.rb
Overview
Button shown by the UI to get what's selected
Defined Under Namespace
Classes: Background
Constant Summary collapse
- ELEMENTS_POSITION =
Positions of the elements in the button
{'POS_ICON' => [1, 1], 'POS_NAME' => [41, 16], 'POS_GENDER' => [5, 16], 'POS_EFFICIENCY_TEXT' => [18, 35], 'POS_CURSOR' => [-10, 12]}
- ELEMENTS_POSITION_3V3 =
Positions of the elements in the button for 3v3 battles
{'POS_ICON' => [6, 0], 'POS_NAME' => [8, 34], 'POS_GENDER' => [8, 38], 'POS_EFFICIENCY_TEXT' => [1, 51], 'POS_CURSOR' => [2, 12]}
Constants inherited from UI::SpriteStack
UI::SpriteStack::NO_INITIAL_IMAGE
Instance Attribute Summary collapse
-
#cursor ⇒ Cursor
readonly
Get the cursor.
-
#row_size ⇒ Cursor
readonly
Get the cursor.
-
#selected ⇒ Boolean
Get the selected state of the button.
Attributes inherited from UI::SpriteStack
#animated, #data, #font_id, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#data=(pokemon)
Set the Pokemon shown.
-
#initialize(viewport, index, row_size, pokemon, launcher, move, is_target) ⇒ Button
constructor
Create a new button.
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, row_size, pokemon, launcher, move, is_target) ⇒ Button
Create a new button
1905 1906 |
# File 'docs/5_Battle_01_Scene.rb', line 1905 def initialize(, index, row_size, pokemon, launcher, move, is_target) end |
Instance Attribute Details
#cursor ⇒ Cursor (readonly)
Get the cursor
1887 1888 1889 |
# File 'docs/5_Battle_01_Scene.rb', line 1887 def cursor @cursor end |
#row_size ⇒ Cursor (readonly)
Get the cursor
1890 1891 1892 |
# File 'docs/5_Battle_01_Scene.rb', line 1890 def row_size @row_size end |
#selected ⇒ Boolean
Get the selected state of the button
1884 1885 1886 |
# File 'docs/5_Battle_01_Scene.rb', line 1884 def selected @selected end |
Instance Method Details
#data=(pokemon)
Set the Pokemon shown
1913 1914 |
# File 'docs/5_Battle_01_Scene.rb', line 1913 def data=(pokemon) end |