Class: UI::VoltorbFlip::Cursor

Inherits:
Sprite show all
Defined in:
docs/01450_Systems_09000_Games.rb

Overview

Cursor shown in VoltorbFlip scene

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

Methods inherited from LiteRGSS::Sprite

new, #set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport) ⇒ Cursor

Create a new cursor

Parameters:



140
141
# File 'docs/01450_Systems_09000_Games.rb', line 140

def initialize(viewport)
end

Instance Attribute Details

#board_xInteger (readonly)

The X coords on the board of the cursor

Returns:

  • (Integer)


131
132
133
# File 'docs/01450_Systems_09000_Games.rb', line 131

def board_x
  @board_x
end

#board_yInteger (readonly)

The Y coords on the board of the cursor

Returns:

  • (Integer)


134
135
136
# File 'docs/01450_Systems_09000_Games.rb', line 134

def board_y
  @board_y
end

#modeSymbol

The cursor mode :normal, :memo

Returns:

  • (Symbol)


137
138
139
# File 'docs/01450_Systems_09000_Games.rb', line 137

def mode
  @mode
end

Instance Method Details

#get_board_position(x, y) ⇒ Array(Integer, Integer)

Convert board coord in pixel coords

Parameters:

  • x (Integer)

    X position on the board

  • y (Integer)

    Y position on the board

Returns:

  • (Array(Integer, Integer))

    the pixel coordinate



150
151
# File 'docs/01450_Systems_09000_Games.rb', line 150

def get_board_position(x, y)
end

#move_on_board(dx, dy)

Start the cursor mouvement

Parameters:

  • dx (Integer)

    the number of case to move in x

  • dy (Integer)

    the number of case to move in y



155
156
# File 'docs/01450_Systems_09000_Games.rb', line 155

def move_on_board(dx, dy)
end

#moveto(board_x, board_y)

Move the cursor to a dedicated board coordinate

Parameters:

  • board_x (Integer)
  • board_y (Integer)


160
161
# File 'docs/01450_Systems_09000_Games.rb', line 160

def moveto(board_x, board_y)
end

#update_moveBoolean

Update the cursor mouvement, return true if the mouvement has been updated

Returns:

  • (Boolean)


144
145
# File 'docs/01450_Systems_09000_Games.rb', line 144

def update_move
end