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



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

def initialize(viewport)
end

Instance Attribute Details

#index ⇒ Integer

Returns index of the current active item.

Returns:

  • (Integer) —

    index of the current active item



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

def index
  @index
end

Instance Method Details

#done? ⇒ Boolean

Test if the animation is done

Returns:

  • (Boolean)


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

def done?
end

#item_list=(list)

Set the item list

Parameters:

  • list (Array<Integer>)


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

def item_list=(list)
end

#mouse_delta_index ⇒ Integer

Return the delta index with mouse position

Returns:

  • (Integer)


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

def mouse_delta_index
end

#move_down

Move all the button down



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

def move_down
end

#move_up

Move all the button up



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

def move_up
end

#update

Update the animation



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

def update
end