Difference between revisions of "CTNTVirtualPad.new"
(slowly :-)) |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
Creates a new TNT Virtual Pad object ('''VPAD'''). | Creates a new TNT Virtual Pad object ('''VPAD'''). | ||
− | < | + | <syntaxhighlight lang="lua"> |
CTNTVirtualPad.new(parent, texturePack, padSticks, padButtons, borderSpace, layerIndex, vBorderSpace, restrict) | CTNTVirtualPad.new(parent, texturePack, padSticks, padButtons, borderSpace, layerIndex, vBorderSpace, restrict) | ||
</source> | </source> |
Revision as of 14:26, 13 July 2023
Available since: Gideros 2019.4
Class: VirtualPad
Description
Creates a new TNT Virtual Pad object (VPAD). <syntaxhighlight lang="lua"> CTNTVirtualPad.new(parent, texturePack, padSticks, padButtons, borderSpace, layerIndex, vBorderSpace, restrict) </source>
padSticks possible values:
- PAD.STICK_NONE
- PAD.STICK_SINGLE
- PAD.STICK_DOUBLE
padButtons possible values:
- PAD.BUTTONS_NONE
- PAD.BUTTONS_ONE
- PAD.BUTTONS_TWO
- PAD.BUTTONS_THREE
- PAD.BUTTONS_FOUR
- PAD.BUTTONS_FIVE
- PAD.BUTTONS_SIX
Parameters
parent: (Sprite) the parent of the VPAD
texturePack: (TextureBase) the texture pack of the VPAD
padSticks: (number) number of pad sticks
padButtons: (number) number of buttons
borderSpace: (number) minimum space (in pixel) from screen borders and VPAD components
layerIndex: (number) the layer of the virtual pad (if not defined use layer 0). With this value you can manage the position (layer) of virtual pad optional
vBorderSpace: (number) vertical border space. Activates flipped mode if negative. (default: same as horizontal border space) optional
restrict: (number) screen restrict for setting screen height from base (default = height) optional
- CTNTVirtualPad:free
- CTNTVirtualPad:setAlpha
- CTNTVirtualPad:setColor
- CTNTVirtualPad:setDefaultButtonSprites
- CTNTVirtualPad:setDefaultJoySprites
- CTNTVirtualPad:setHideDelay
- CTNTVirtualPad:setHideMode
- CTNTVirtualPad:setJoyAsAnalog
- CTNTVirtualPad:setJoyStyle
- CTNTVirtualPad:setMaxRadius
- CTNTVirtualPad:setPosition
- CTNTVirtualPad:setScale
- CTNTVirtualPad:setTextures
- CTNTVirtualPad:start
- CTNTVirtualPad:stop