Class: UI::Quest::QuestList

Inherits:
SpriteStack show all
Defined in:
docs/4_Systems_800_Quest.rb

Overview

UI element listing the quests

Constant Summary collapse

NB_QUEST_BUTTON =

Number of buttons generated

7
BUTTON_OFFSET =

Offset between each button

28
BASE_X =

Base X coordinate

19
BASE_Y =

Base Y coordinate

41

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from SpriteStack

#animated, #data, #font_id, #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, quest_hash, category) ⇒ QuestList

Create a new QuestList

Parameters:

  • viewport (Viewport) —

    viewport in which the SpriteStack will be displayed

  • quest_hash (Hash) —

    the hash containing the quests

  • category (Symbol) —

    the current category the UI spawns in



647
648
# File 'docs/4_Systems_800_Quest.rb', line 647

def initialize(viewport, quest_hash, category)
end

Instance Attribute Details

#buttons ⇒ Array<QuestButton> (readonly)

Returns:



640
641
642
# File 'docs/4_Systems_800_Quest.rb', line 640

def buttons
  @buttons
end

#index ⇒ Integer

Returns index of the current active item.

Returns:

  • (Integer) —

    index of the current active item



638
639
640
# File 'docs/4_Systems_800_Quest.rb', line 638

def index
  @index
end

#timing=(value) ⇒ Symbol

Returns the pace of the timing (:slow, :medium, :fast).

Returns:

  • (Symbol) —

    the pace of the timing (:slow, :medium, :fast)



642
643
644
# File 'docs/4_Systems_800_Quest.rb', line 642

def timing=(value)
  @timing = value
end

Instance Method Details

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

Change the right button mode and return the animation

Parameters:

  • mode (Symbol)

Returns:



669
670
# File 'docs/4_Systems_800_Quest.rb', line 669

def change_mode(mode)
end

#last_index? ⇒ Boolean

Tell if the current index is the same as the last quest for this category

Returns:

  • (Boolean)


664
665
# File 'docs/4_Systems_800_Quest.rb', line 664

def last_index?
end

#move_down

Move all the buttons down



661
662
# File 'docs/4_Systems_800_Quest.rb', line 661

def move_down
end

#move_up

Move all the buttons up



658
659
# File 'docs/4_Systems_800_Quest.rb', line 658

def move_up
end

#number_of_buttons ⇒ Integer

Return the number of buttons registered in the stack

Returns:

  • (Integer)


651
652
# File 'docs/4_Systems_800_Quest.rb', line 651

def number_of_buttons
end