Class: UI::Bag::ButtonList

Inherits:
Array
  • Object
show all
Defined in:
docs/4_Systems_103_Bag.rb

Overview

List of button showing the item name

Defined Under Namespace

Classes: ItemButton

Constant Summary collapse

AMOUNT =

Number of button in the list

9
BUTTON_OFFSET =

Offset between each button

25
ACTIVE_OFFSET =

Offset between active button & inative button

-8
# Base X coordinate
BASE_X =

Base X coordinate

191
BASE_Y =

Base Y coordinate

18

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(viewport) ⇒ ButtonList

Create a new ButtonList



291
292
# File 'docs/4_Systems_103_Bag.rb', line 291

def initialize(viewport)
end

Instance Attribute Details

#indexInteger

Returns index of the current active item.

Returns:

  • (Integer)

    index of the current active item



289
290
291
# File 'docs/4_Systems_103_Bag.rb', line 289

def index
  @index
end

Instance Method Details

#done?Boolean

Test if the animation is done

Returns:

  • (Boolean)


298
299
# File 'docs/4_Systems_103_Bag.rb', line 298

def done?
end

#item_list=(list)

Set the item list

Parameters:

  • list (Array<Integer>)


312
313
# File 'docs/4_Systems_103_Bag.rb', line 312

def item_list=(list)
end

#mouse_delta_indexInteger

Return the delta index with mouse position

Returns:

  • (Integer)


316
317
# File 'docs/4_Systems_103_Bag.rb', line 316

def mouse_delta_index
end

#move_down

Move all the button down



308
309
# File 'docs/4_Systems_103_Bag.rb', line 308

def move_down
end

#move_up

Move all the button up



305
306
# File 'docs/4_Systems_103_Bag.rb', line 305

def move_up
end

#update

Update the animation



294
295
# File 'docs/4_Systems_103_Bag.rb', line 294

def update
end