Class: UI::Shop::PkmList

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

Overview

List of Creatures for the shop UI

Defined Under Namespace

Classes: ListButtonPkm

Constant Summary collapse

AMOUNT =

Number of button in the list

4
BUTTON_OFFSET =

Offset between each button

38
ACTIVE_OFFSET =

Offset between active button & inative button

-14
# Base X coordinate
BASE_X =

Base X coordinate

128
BASE_Y =

Base Y coordinate

30

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(viewport) ⇒ PkmList

Create a new ButtonList

Parameters:

  • viewport (Viewport) —

    viewport in which the SpriteStack will be displayed



307
308
# File 'docs/4_Systems_203_Shop.rb', line 307

def initialize(viewport)
end

Instance Attribute Details

#index ⇒ Integer

Returns index of the current active item.

Returns:

  • (Integer) —

    index of the current active item



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

def index
  @index
end

Instance Method Details

#done? ⇒ Boolean

Test if the animation is done

Returns:

  • (Boolean)


314
315
# File 'docs/4_Systems_203_Shop.rb', line 314

def done?
end

#item_list=(list)

Set the item list

Parameters:

  • list (Array<Integer>)


328
329
# File 'docs/4_Systems_203_Shop.rb', line 328

def item_list=(list)
end

#item_price=(list)

Set the price list

Parameters:

  • list (Array<Integer>)


332
333
# File 'docs/4_Systems_203_Shop.rb', line 332

def item_price=(list)
end

#mouse_delta_index ⇒ Integer

Return the delta index with mouse position

Returns:

  • (Integer)


336
337
# File 'docs/4_Systems_203_Shop.rb', line 336

def mouse_delta_index
end

#move_down

Move all the buttons down



324
325
# File 'docs/4_Systems_203_Shop.rb', line 324

def move_down
end

#move_up

Move all the buttons up



321
322
# File 'docs/4_Systems_203_Shop.rb', line 321

def move_up
end

#update

Update the animation



310
311
# File 'docs/4_Systems_203_Shop.rb', line 310

def update
end