Class: UI::MoveTeaching::NewSkill
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::MoveTeaching::NewSkill
- Defined in:
- scripts/01450 Systems/00301 MoveTeaching/00002 UI/00040 NewSkill.rb
Overview
UI part displaying the new skill informations in the Skill Learn scene
Constant Summary
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#selected ⇒ Boolean
If the move is currently selected.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#data=(skill)
Set the skill data.
-
#initialize(viewport, index) ⇒ NewSkill
constructor
Create informations of the new skill to learn.
-
#visible ⇒ Boolean
Get the visibility of the sprite.
-
#visible=(value)
Set the visibility of the sprite.
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, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport, index) ⇒ NewSkill
Create informations of the new skill to learn
10 11 12 13 14 15 16 17 |
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00040 NewSkill.rb', line 10 def initialize(, index) super(, 35, 133, default_cache: :interface) create_texts create_graphics @new_skill_index = index self.selected = false self.visible = false end |
Instance Attribute Details
#selected ⇒ Boolean
Returns if the move is currently selected.
6 7 8 |
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00040 NewSkill.rb', line 6 def selected @selected end |
Instance Method Details
#data=(skill)
Set the skill data
21 22 23 24 |
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00040 NewSkill.rb', line 21 def data=(skill) super @selector.visible = @selected end |
#visible ⇒ Boolean
Get the visibility of the sprite
35 36 37 |
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00040 NewSkill.rb', line 35 def visible return @stack[1].visible end |
#visible=(value)
Set the visibility of the sprite
28 29 30 31 |
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00040 NewSkill.rb', line 28 def visible=(value) super(value && @data) @selector.visible = @selected end |