Class: UI::Storage::Cursor

Overview

Class responsive of showing the cursor

Constant Summary collapse

BOX_INITIAL_POSITION =

Box initial position

[17, 42]
PARTY_POSITIONS =

Party positions

[[233, 50], [281, 66], [233, 98], [281, 115], [233, 146], [281, 162]]
ARROW_IMAGES =

List of graphics depending on the selection mode

{battle: 'pc/arrow_red', pokemon: 'pc/arrow_blue', grouped: 'pc/arrow_green', item: 'pc/arrow_yellow'}

Instance Attribute Summary collapse

Attributes inherited from LiteRGSS::ShaderedSprite

#blendmode, #shader

Attributes inherited from LiteRGSS::Sprite

#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y

Instance Method Summary collapse

Methods inherited from Sprite

#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords

Methods inherited from LiteRGSS::Sprite

new, #set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport, index, inbox, mode_handler) ⇒ Cursor

Create a new cusror object

Parameters:

  • viewport (Viewport)
  • index (Integer)

    index of the cursor where it is

  • inbox (Boolean)

    If the cursor is in box or not

  • mode_handler (ModeHandler)


369
370
# File 'docs/4_Systems_200_Storage.rb', line 369

def initialize(viewport, index, inbox, mode_handler)
end

Instance Attribute Details

#inboxBoolean

Get the inbox property /!\ Always update this before index

Returns:

  • (Boolean)


348
349
350
# File 'docs/4_Systems_200_Storage.rb', line 348

def inbox
  @inbox
end

#indexInteger

Get the index

Returns:

  • (Integer)


345
346
347
# File 'docs/4_Systems_200_Storage.rb', line 345

def index
  @index
end

#modeSymbol

Get the current mode

Returns:

  • (Symbol)


357
358
359
# File 'docs/4_Systems_200_Storage.rb', line 357

def mode
  @mode
end

#select_boxBoolean

Get the select box mode

Returns:

  • (Boolean)


351
352
353
# File 'docs/4_Systems_200_Storage.rb', line 351

def select_box
  @select_box
end

#selection_modeSymbol

Get the current selection mode

Returns:

  • (Symbol)


354
355
356
# File 'docs/4_Systems_200_Storage.rb', line 354

def selection_mode
  @selection_mode
end

Instance Method Details

#done?Boolean

Tell if the animation is done

Returns:

  • (Boolean)


376
377
# File 'docs/4_Systems_200_Storage.rb', line 376

def done?
end

#force_index(inbox, index)

Force an index (mouse operation)

Parameters:

  • inbox (Boolean)
  • index (Integer)


389
390
# File 'docs/4_Systems_200_Storage.rb', line 389

def force_index(inbox, index)
end

#max_indexInteger

Get the max index

Returns:

  • (Integer)


380
381
# File 'docs/4_Systems_200_Storage.rb', line 380

def max_index
end

#update

Update the animation



372
373
# File 'docs/4_Systems_200_Storage.rb', line 372

def update
end