Class: UI::Summary_Skills

Inherits:
SpriteStack show all
Defined in:
scripts/01450 Systems/00102 Party/00002 UI/00400 Summary_Skills.rb

Overview

UI part displaying the Skills of the Pokemon in the Summary

Direct Known Subclasses

Summary_Remind

Constant Summary

Constants inherited from SpriteStack

UI::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, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport) ⇒ Summary_Skills

Create a new Skills UI for the summary

Parameters:



10
11
12
13
14
# File 'scripts/01450 Systems/00102 Party/00002 UI/00400 Summary_Skills.rb', line 10

def initialize(viewport)
  super(viewport, 0, 0, default_cache: :interface)
  init_sprite
  self.index = 0
end

Instance Attribute Details

#indexInteger

Returns The index of the move.

Returns:

  • (Integer)

    The index of the move



5
6
7
# File 'scripts/01450 Systems/00102 Party/00002 UI/00400 Summary_Skills.rb', line 5

def index
  @index
end

#skillsArray<UI::Summary_Skill> (readonly)

Returns The skills.

Returns:



7
8
9
# File 'scripts/01450 Systems/00102 Party/00002 UI/00400 Summary_Skills.rb', line 7

def skills
  @skills
end

Instance Method Details

#data=(pokemon)

Set the data of the UI

Parameters:



18
19
20
21
22
# File 'scripts/01450 Systems/00102 Party/00002 UI/00400 Summary_Skills.rb', line 18

def data=(pokemon)
  super
  self.index = index
  update_skills(pokemon)
end

#visible=(value)

Set the visibility of the UI

Parameters:

  • value (Boolean)

    new visibility



26
27
28
29
30
# File 'scripts/01450 Systems/00102 Party/00002 UI/00400 Summary_Skills.rb', line 26

def visible=(value)
  super
  @move_info.visible = value
  @skills.each { |skill| skill.visible = value }
end