forked from LeenkxTeam/LNXSDK
27 lines
907 B
Python
27 lines
907 B
Python
|
|
from lnx.logicnode.lnx_nodes import *
|
||
|
|
|
||
|
|
class SetVirtualButtonNode(LnxLogicTreeNode):
|
||
|
|
bl_idname = 'LNSetVirtualButtonNode'
|
||
|
|
bl_label = 'Set Virtual Button'
|
||
|
|
lnx_section = 'virtual'
|
||
|
|
lnx_version = 1
|
||
|
|
|
||
|
|
property0: bpy.props.EnumProperty(
|
||
|
|
items=[('Keyboard', 'Keyboard', 'Keyboard'),
|
||
|
|
('Mouse', 'Mouse', 'Mouse'),
|
||
|
|
('Gamepad', 'Gamepad', 'Gamepad')],
|
||
|
|
name='Input',
|
||
|
|
default='Keyboard'
|
||
|
|
)
|
||
|
|
property1: bpy.props.StringProperty(name='Virtual Button', default='')
|
||
|
|
property2: bpy.props.StringProperty(name='Physical Button', default='')
|
||
|
|
|
||
|
|
def lnx_init(self, context):
|
||
|
|
self.add_input('LnxNodeSocketAction', 'In')
|
||
|
|
self.add_output('LnxNodeSocketAction', 'Out')
|
||
|
|
|
||
|
|
def draw_buttons(self, context, layout):
|
||
|
|
layout.prop(self, 'property0')
|
||
|
|
layout.prop(self, 'property1')
|
||
|
|
layout.prop(self, 'property2')
|