CTNTVirtualPad:setJoyStyle: Difference between revisions

From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2019.4<br/> '''Class:''' VirtualPad<br/> === Description === Sets the VPAD joysticks movement style. <source lang="lua"> CTNTVirt..."
 
No edit summary
 
(3 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 ===
Sets the VPAD joysticks movement style.
Sets the VPAD joysticks movement style.
<source lang="lua">
<syntaxhighlight lang="lua">
CTNTVirtualPad:setJoyStyle(padComponent, style)
CTNTVirtualPad:setJoyStyle(padComponent, style)
</source>
</syntaxhighlight>




Line 21: Line 21:
=== Parameters ===
=== Parameters ===
'''padComponent''': (number) the pad component<br/>
'''padComponent''': (number) the pad component<br/>
'''style''': (bool) the joystick movement style (default = PAD.STYLE_CLASSIC)<br/>
'''style''': (number) the joystick movement style (default = PAD.STYLE_CLASSIC)<br/>





Latest revision as of 21:23, 24 January 2026

Available since: Gideros 2019.4
Class: TntVirtualPad

Description

Sets the VPAD joysticks movement style.

CTNTVirtualPad:setJoyStyle(padComponent, style)


padComponent possible values:

  • PAD.COMPO_LEFTPAD
  • PAD.COMPO_RIGHTPAD

style possible values:

  • PAD.STYLE_CLASSIC (default) joysticks are fixed
  • PAD.STYLE_MOVABLE joysticks move where user last touch the screen then is fixed to this position
  • PAD.STYLE_FOLLOW joystick follow user finger movement

Parameters

padComponent: (number) the pad component
style: (number) the joystick movement style (default = PAD.STYLE_CLASSIC)


STYLE_MOVABLE is a typo in the class (it should have been MOVEABLE) ;-)