Class: DPad

DPad(options)

new DPad(options)

Renders a Dpad

Parameters:
Name Type Description
options DPad~Options
Source:

Methods

draw(dirInfo)

Draws the dpad given a DirInfo

Parameters:
Name Type Description
dirInfo module:Input.DirectionInfo
Source:

drawBits(bits)

Draws the dpad given a set of bits

Parameters:
Name Type Description
bits number

where 0x1 is right, 0x2 is left, 0x4 is up and 0x8 is down.

Source:

getSize() → {number}

Gets the size of the dpad

Source:
Returns:

size of dpad in CSS pixels

Type
number

resize()

Resizes the DPad to match its container or to the size specified at creation time

Source:

Type Definitions

Options

Type:
  • Object
Properties:
Name Type Description
elemnt HTMLElement

element to put dpad inside. DPad will be resized to fit this element or to the size specified

size number

size in CSS pixels to make DPad

Source: