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, #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



636
637
# File 'docs/4_Systems_800_Quest.rb', line 636

def initialize(viewport, quest_hash, category)
end

Instance Attribute Details

#buttonsArray<QuestButton> (readonly)

Returns:



629
630
631
# File 'docs/4_Systems_800_Quest.rb', line 629

def buttons
  @buttons
end

#indexInteger

Returns index of the current active item.

Returns:

  • (Integer)

    index of the current active item



627
628
629
# File 'docs/4_Systems_800_Quest.rb', line 627

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)



631
632
633
# File 'docs/4_Systems_800_Quest.rb', line 631

def timing=(value)
  @timing = value
end

Instance Method Details

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

Change the right button mode and return the animation

Parameters:

  • mode (Symbol)

Returns:



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

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)


653
654
# File 'docs/4_Systems_800_Quest.rb', line 653

def last_index?
end

#move_down

Move all the buttons down



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

def move_down
end

#move_up

Move all the buttons up



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

def move_up
end

#number_of_buttonsInteger

Return the number of buttons registered in the stack

Returns:

  • (Integer)


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

def number_of_buttons
end