2020-09-20 20:10:01 +02:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
|
|
|
class GetTouchLocationNode(ArmLogicTreeNode):
|
2020-10-05 19:55:56 +02:00
|
|
|
"""Returns the location of the last touch event in screen coordinates (pixels)."""
|
2020-09-20 20:10:01 +02:00
|
|
|
bl_idname = 'LNGetTouchLocationNode'
|
|
|
|
bl_label = 'Get Touch Location'
|
2020-10-27 19:44:37 +01:00
|
|
|
arm_section = 'surface'
|
2020-09-20 20:10:01 +02:00
|
|
|
arm_version = 1
|
|
|
|
|
|
|
|
def init(self, context):
|
|
|
|
super(GetTouchLocationNode, self).init(context)
|
|
|
|
self.add_output('NodeSocketInt', 'X')
|
|
|
|
self.add_output('NodeSocketInt', 'Y')
|
|
|
|
self.add_output('NodeSocketInt', 'Inverted X')
|
|
|
|
self.add_output('NodeSocketInt', 'Inverted Y')
|