Class: UI::Quest::QuestButton

Inherits:
SpriteStack show all
Defined in:
docs/4_Systems_800_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



476
477
# File 'docs/4_Systems_800_Quest.rb', line 476

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

Instance Attribute Details

#hidden

Returns the value of attribute hidden.



466
467
468
# File 'docs/4_Systems_800_Quest.rb', line 466

def hidden
  @hidden
end

#quest

Return the quest linked to this button

Returns:

  • PFM::Quests::Quest



469
470
471
# File 'docs/4_Systems_800_Quest.rb', line 469

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:



481
482
# File 'docs/4_Systems_800_Quest.rb', line 481

def change_mode(mode)
end