Class: BattleUI::PlayerChoice::ItemInfo
- Inherits:
-
UI::SpriteStack
- Object
- UI::SpriteStack
- BattleUI::PlayerChoice::ItemInfo
- Includes:
- HideShow
- Defined in:
- scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00200 PlayerChoice.rb
Overview
UI showing the info about the last used item
Constant Summary
Constants inherited from UI::SpriteStack
UI::SpriteStack::NO_INITIAL_IMAGE
Instance Attribute Summary collapse
-
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation}
readonly
Get the animation handler.
Attributes inherited from UI::SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#data=(item)
Set the data shown by the UI.
-
#done? ⇒ Boolean
Tell if the animation is done.
-
#initialize(viewport) ⇒ ItemInfo
constructor
Create a new Item Info box.
-
#update
Update the sprite.
Methods included from HideShow
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_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
Instance Attribute Details
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation} (readonly)
Get the animation handler
136 137 138 |
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00200 PlayerChoice.rb', line 136 def animation_handler @animation_handler end |
Instance Method Details
#data=(item)
Set the data shown by the UI
147 148 149 150 |
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00200 PlayerChoice.rb', line 147 def data=(item) super @remaining.text = $bag.item_quantity(item.db_symbol).to_s end |
#done? ⇒ Boolean
Tell if the animation is done
159 160 161 |
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00200 PlayerChoice.rb', line 159 def done? return @animation_handler.done? end |
#update
Update the sprite
153 154 155 |
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00200 PlayerChoice.rb', line 153 def update @animation_handler.update end |