Class: BattleUI::TargetSelection::Button

Inherits:
UI::SpriteStack show all
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

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, row_size, pokemon, launcher, move, is_target) ⇒ Button

Create a new button

Parameters:



1594
1595
# File 'docs/5_Battle_01_Scene.rb', line 1594

def initialize(viewport, index, row_size, pokemon, launcher, move, is_target)
end

Instance Attribute Details

#cursorCursor (readonly)

Get the cursor

Returns:



1585
1586
1587
# File 'docs/5_Battle_01_Scene.rb', line 1585

def cursor
  @cursor
end

#selectedBoolean

Get the selected state of the button

Returns:

  • (Boolean)


1582
1583
1584
# File 'docs/5_Battle_01_Scene.rb', line 1582

def selected
  @selected
end

Instance Method Details

#data=(pokemon)

Set the Pokemon shown

Parameters:



1602
1603
# File 'docs/5_Battle_01_Scene.rb', line 1602

def data=(pokemon)
end