Class: UI::Quest::QuestButton

Inherits:
SpriteStack show all
Defined in:
docs/01450_Systems_08000_Quest.rb

Overview

Quest Button UI element

Constant Summary

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

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, #visible=, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport, x, y, quest, status) ⇒ QuestButton

Initialize the QuestButton component

Parameters:

  • viewport (Viewport)
  • x (Integer)
  • y (Integer)
  • quest (PFM::Quests::Quest)
  • status (Symbol)

    if the quest is a primary, a secondary, or a finished quest



433
434
# File 'docs/01450_Systems_08000_Quest.rb', line 433

def initialize(viewport, x, y, quest, status)
end

Instance Attribute Details

#hidden

Returns the value of attribute hidden.



423
424
425
# File 'docs/01450_Systems_08000_Quest.rb', line 423

def hidden
  @hidden
end

#quest

Return the quest linked to this button

Returns:

  • PFM::Quests::Quest



426
427
428
# File 'docs/01450_Systems_08000_Quest.rb', line 426

def quest
  @quest
end

Instance Method Details

#change_mode(mode) ⇒ Yuki::Animation::ScalarAnimation

Get the animation corresponding to the mode the button switches in

Parameters:

  • mode (Symbol)

Returns:



438
439
# File 'docs/01450_Systems_08000_Quest.rb', line 438

def change_mode(mode)
end