CTNTVirtualPad.new: Difference between revisions

From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2019.4<br/> '''Class:''' VirtualPad<br/> === Description === Creates a new TNT Virtual Pad object. <source lang="lua"> CTNTVirtua..."
 
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''Available since:''' Gideros 2019.4<br/>
'''Available since:''' Gideros 2019.4<br/>
'''Class:''' [[VirtualPad]]<br/>
'''Class:''' [[TntVirtualPad]]<br/>


=== Description ===
=== Description ===
Creates a new TNT Virtual Pad object.
Creates a new TNT Virtual Pad object ('''VPAD''').
<source lang="lua">
<syntaxhighlight lang="lua">
CTNTVirtualPad.new(parent, texturePack, padSticks, padButtons, borderSpace, layerIndex, vBorderSpace, restrict)
CTNTVirtualPad.new(parent, texturePack, padSticks, padButtons, borderSpace, layerIndex, vBorderSpace, restrict)
</source>
</syntaxhighlight>
 
 
'''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 ===
=== Parameters ===
'''parent''': (Sprite) the parent of the TNT Virtual Pad<br/>
'''parent''': (Sprite) the parent of the VPAD<br/>
'''texturePack''': (TextureBase) the texture pack of the TNT Virtual Pad<br/>
'''texturePack''': (TextureBase) the texture pack of the VPAD<br/>
'''padSticks''': (number) width of pixel '''TO DO...AND BELOW AS WELL :-)'''<br/>
'''padSticks''': (number) number of pad sticks<br/>
'''padButtons''': (number) height of pixel '''optional'''<br/>
'''padButtons''': (number) number of buttons<br/>
'''borderSpace''': (number) hex value representing color '''optional'''<br/>
'''borderSpace''': (number) minimum space (in pixel) from screen borders and VPAD components<br/>
'''layerIndex''': (number) alpha value from 0 to 1 '''optional'''<br/>
'''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'''<br/>
'''vBorderSpace''': (number) width of pixel '''optional'''<br/>
'''vBorderSpace''': (number) vertical border space. Activates flipped mode if negative. (default: same as horizontal border space) '''optional'''<br/>
'''restrict''': (number) height of pixel '''optional'''<br/>
'''restrict''': (number) screen restrict for setting screen height from base (default = height) '''optional'''<br/>


{{VirtualPad}}
{{VirtualPad}}

Latest revision as of 21:21, 24 January 2026

Available since: Gideros 2019.4
Class: TntVirtualPad

Description

Creates a new TNT Virtual Pad object (VPAD).

CTNTVirtualPad.new(parent, texturePack, padSticks, padButtons, borderSpace, layerIndex, vBorderSpace, restrict)


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