armory/blender/arm/logicnode/input/LN_gamepad_coords.py

24 lines
816 B
Python
Raw Normal View History

2017-04-10 21:17:17 +02:00
from arm.logicnode.arm_nodes import *
class GamepadCoordsNode(ArmLogicTreeNode):
2020-10-05 19:55:56 +02:00
"""Returns the coordinates of the given gamepad.
2020-09-28 15:58:41 +02:00
@seeNode Gamepad
@input Gamepad: the ID of the gamepad."""
2017-04-10 21:17:17 +02:00
bl_idname = 'LNGamepadCoordsNode'
bl_label = 'Gamepad Coords'
arm_version = 1
2020-10-27 19:44:37 +01:00
arm_section = 'gamepad'
2017-04-10 21:17:17 +02:00
def init(self, context):
super(GamepadCoordsNode, self).init(context)
2020-09-08 21:49:02 +02:00
self.add_output('NodeSocketVector', 'Left Stick')
self.add_output('NodeSocketVector', 'Right Stick')
self.add_output('NodeSocketVector', 'Left Movement')
self.add_output('NodeSocketVector', 'Right Movement')
self.add_output('NodeSocketFloat', 'Left Trigger')
self.add_output('NodeSocketFloat', 'Right Trigger')
2020-11-17 16:01:15 +01:00
2020-09-08 21:49:02 +02:00
self.add_input('NodeSocketInt', 'Gamepad')