forked from LeenkxTeam/LNXSDK
t3du - Labels for finding nodes
This commit is contained in:
@ -7,12 +7,19 @@ class KeyboardNode(LnxLogicTreeNode):
|
|||||||
lnx_section = 'keyboard'
|
lnx_section = 'keyboard'
|
||||||
lnx_version = 2
|
lnx_version = 2
|
||||||
|
|
||||||
|
def update(self):
|
||||||
|
self.label = f'{self.bl_label}: {self.property0} {self.property1}'
|
||||||
|
|
||||||
|
def upd(self, context):
|
||||||
|
self.label = f'{self.bl_label}: {self.property0} {self.property1}'
|
||||||
|
|
||||||
|
|
||||||
property0: HaxeEnumProperty(
|
property0: HaxeEnumProperty(
|
||||||
'property0',
|
'property0',
|
||||||
items = [('started', 'Started', 'The keyboard button starts to be pressed'),
|
items = [('started', 'Started', 'The keyboard button starts to be pressed'),
|
||||||
('down', 'Down', 'The keyboard button is pressed'),
|
('down', 'Down', 'The keyboard button is pressed'),
|
||||||
('released', 'Released', 'The keyboard button stops being pressed')],
|
('released', 'Released', 'The keyboard button stops being pressed')],
|
||||||
name='', default='down')
|
name='', default='down', update=upd)
|
||||||
|
|
||||||
property1: HaxeEnumProperty(
|
property1: HaxeEnumProperty(
|
||||||
'property1',
|
'property1',
|
||||||
@ -69,7 +76,7 @@ class KeyboardNode(LnxLogicTreeNode):
|
|||||||
('right', 'right', 'right'),
|
('right', 'right', 'right'),
|
||||||
('left', 'left', 'left'),
|
('left', 'left', 'left'),
|
||||||
('down', 'down', 'down'),],
|
('down', 'down', 'down'),],
|
||||||
name='', default='space')
|
name='', default='space', update=upd)
|
||||||
|
|
||||||
def lnx_init(self, context):
|
def lnx_init(self, context):
|
||||||
self.add_output('LnxNodeSocketAction', 'Out')
|
self.add_output('LnxNodeSocketAction', 'Out')
|
||||||
|
Reference in New Issue
Block a user