Class: UI::MoveTeaching::SkillDescription

Inherits:
SpriteStack show all
Defined in:
scripts/01450 Systems/00301 MoveTeaching/00002 UI/00030 SkillDescription.rb

Overview

UI part displaying the Skill description in the Skill Learn scene

Constant Summary

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary

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) ⇒ SkillDescription

Create informations of the hovered skill

Parameters:



7
8
9
10
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00030 SkillDescription.rb', line 7

def initialize(viewport)
  super(viewport, 114, 16, default_cache: :interface)
  create_texts
end

Instance Method Details

#data=(skill)

Set the data of the UI

Parameters:



14
15
16
17
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00030 SkillDescription.rb', line 14

def data=(skill)
  super
  update_infos(skill)
end

#visible=(value)

Set the visibility of the UI

Parameters:

  • value (Boolean)

    new visibility



21
22
23
24
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00030 SkillDescription.rb', line 21

def visible=(value)
  super
  @skill_info.visible = value
end