Class: UI::Summary_Skills
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Summary_Skills
- 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
Constant Summary
Constants inherited from SpriteStack
UI::SpriteStack::NO_INITIAL_IMAGE
Instance Attribute Summary collapse
-
#index ⇒ Integer
The index of the move.
-
#skills ⇒ Array<UI::Summary_Skill>
readonly
The skills.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#data=(pokemon)
Set the data of the UI.
-
#initialize(viewport) ⇒ Summary_Skills
constructor
Create a new Skills UI for the summary.
-
#visible=(value)
Set the visibility of the UI.
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
10 11 12 13 14 |
# File 'scripts/01450 Systems/00102 Party/00002 UI/00400 Summary_Skills.rb', line 10 def initialize() super(, 0, 0, default_cache: :interface) init_sprite self.index = 0 end |
Instance Attribute Details
#index ⇒ Integer
Returns 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 |
#skills ⇒ Array<UI::Summary_Skill> (readonly)
Returns The skills.
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
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
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 |