class flixel.ui.FlxVirtualPad extends FlxSpriteGroup
Available on all platforms
A gamepad which contains 4 directional buttons and 4 action buttons. * It's easy to set the callbacks and to customize the layout. * * @author Ka Wing Chin
Instance Fields
function new(?DPad:DPadMode = null, ?Action:ActionMode = null):Void
Create a gamepad which contains 4 directional buttons and 4 action buttons. * *
DPadMode | The D-Pad mode. FULL for example. * |
ActionMode | The action buttons mode. ABC for example. |
function createButton(X:Float, Y:Float, Width:Int, Height:Int, Image:Dynamic, ?OnClick:Void ->Void = null):FlxButton
X | The x-position of the button. * |
Y | The y-position of the button. * |
Width | The width of the button. * |
Height | The height of the button. * |
Image | The image of the button. It must contains 3 frames (NORMAL, HIGHLIGHT, PRESSED). * |
Callback | The callback for the button. * |
returns | The button |