Difference between revisions of "CTNTVirtualPad:setMaxRadius"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2019.4<br/> '''Class:''' VirtualPad<br/> === Description === Sets the touch radius size detection for left and right virtual pads...") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 7: | Line 7: | ||
If maxRadius < 1 then touch detection for leftPad is left half Screen and right half screen for rightPad. | If maxRadius < 1 then touch detection for leftPad is left half Screen and right half screen for rightPad. | ||
− | < | + | <syntaxhighlight lang="lua"> |
CTNTVirtualPad:setMaxRadius(padComponent, maxRadius) | CTNTVirtualPad:setMaxRadius(padComponent, maxRadius) | ||
</source> | </source> | ||
Line 21: | Line 21: | ||
=== Example === | === Example === | ||
− | < | + | <syntaxhighlight lang="lua"> |
vPad:setMaxRadius(PAD.COMPO_LEFTPAD, 110) | vPad:setMaxRadius(PAD.COMPO_LEFTPAD, 110) | ||
</source> | </source> | ||
{{VirtualPad}} | {{VirtualPad}} |
Revision as of 14:26, 13 July 2023
Available since: Gideros 2019.4
Class: VirtualPad
Description
Sets the touch radius size detection for left and right virtual pads.
If maxRadius < 1 then touch detection for leftPad is left half Screen and right half screen for rightPad. <syntaxhighlight lang="lua"> CTNTVirtualPad:setMaxRadius(padComponent, maxRadius) </source>
padComponent possible values:
- PAD.COMPO_LEFTPAD
- PAD.COMPO_RIGHTPAD
Parameters
padComponent: (number) the pad joystick component
maxRadius: (number) any number (if < 1 then half screen is max)
Example
<syntaxhighlight lang="lua"> vPad:setMaxRadius(PAD.COMPO_LEFTPAD, 110) </source>
- 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