Class: UI::Quest::CategoryDisplay
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Quest::CategoryDisplay
- Defined in:
- scripts/01450 Systems/08000 Quest/00002 UI_Quest/00200 Category_Display.rb
Constant Summary collapse
- TEXT_CATEGORY =
{ primary: [:ext_text, 9006, 5], secondary: [:ext_text, 9006, 6], finished: [:ext_text, 9006, 7] }
Constants inherited from SpriteStack
Instance Attribute Summary
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport, category) ⇒ CategoryDisplay
constructor
Initialize the QuestButton component.
-
#update_category_text(category)
Update the category text depending on the new category.
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, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport, category) ⇒ CategoryDisplay
Initialize the QuestButton component
12 13 14 15 16 17 18 19 |
# File 'scripts/01450 Systems/08000 Quest/00002 UI_Quest/00200 Category_Display.rb', line 12 def initialize(, category) super(, *coordinates) @viewport = @category = category create_frame create_category_text create_arrow_frames end |
Instance Method Details
#update_category_text(category)
Update the category text depending on the new category
23 24 25 26 27 |
# File 'scripts/01450 Systems/08000 Quest/00002 UI_Quest/00200 Category_Display.rb', line 23 def update_category_text(category) @category = category @text.text = send(*TEXT_CATEGORY[@category]) update_arrows end |