2017-03-21 03:06:38 +01:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class SurfaceNode(ArmLogicTreeNode):
|
2020-11-17 16:01:15 +01:00
|
|
|
"""Activates the output on the given touch event."""
|
2019-04-30 17:07:57 +02:00
|
|
|
bl_idname = 'LNMergedSurfaceNode'
|
2020-11-17 16:01:15 +01:00
|
|
|
bl_label = 'Touch'
|
2020-10-27 19:44:37 +01:00
|
|
|
arm_section = 'surface'
|
2020-09-13 11:27:58 +02:00
|
|
|
arm_version = 1
|
2020-10-27 19:44:37 +01:00
|
|
|
|
2018-12-18 23:48:38 +01:00
|
|
|
property0: EnumProperty(
|
2020-11-17 18:46:14 +01:00
|
|
|
items = [('Started', 'Started', 'The screen surface starts to be touched'),
|
|
|
|
('Down', 'Down', 'The screen surface is touched'),
|
|
|
|
('Released', 'Released', 'The screen surface stops being touched'),
|
2017-04-03 22:29:46 +02:00
|
|
|
('Moved', 'Moved', 'Moved')],
|
2020-11-17 16:01:15 +01:00
|
|
|
name='', default='Down')
|
2020-09-08 17:03:24 +02:00
|
|
|
|
2017-03-21 03:06:38 +01:00
|
|
|
def init(self, context):
|
2020-09-13 11:27:58 +02:00
|
|
|
super(SurfaceNode, self).init(context)
|
2020-09-08 21:49:02 +02:00
|
|
|
self.add_output('ArmNodeSocketAction', 'Out')
|
|
|
|
self.add_output('NodeSocketBool', 'State')
|
2017-04-03 22:29:46 +02:00
|
|
|
|
|
|
|
def draw_buttons(self, context, layout):
|
|
|
|
layout.prop(self, 'property0')
|