Update Files
This commit is contained in:
26
leenkx/blender/lnx/logicnode/input/LN_touch.py
Normal file
26
leenkx/blender/lnx/logicnode/input/LN_touch.py
Normal file
@ -0,0 +1,26 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class SurfaceNode(LnxLogicTreeNode):
|
||||
"""Activates the output on the given touch event."""
|
||||
bl_idname = 'LNMergedSurfaceNode'
|
||||
bl_label = 'Touch'
|
||||
lnx_section = 'surface'
|
||||
lnx_version = 1
|
||||
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
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'),
|
||||
('moved', 'Moved', 'Moved')],
|
||||
name='', default='down')
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
self.add_output('LnxBoolSocket', 'State')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
||||
|
||||
def draw_label(self) -> str:
|
||||
return f'{self.bl_label}: {self.property0}'
|
Reference in New Issue
Block a user