armory/blender/arm/logicnode/input/LN_mouse.py

30 lines
1,001 B
Python
Raw Normal View History

2017-03-21 03:06:38 +01:00
from arm.logicnode.arm_nodes import *
class MouseNode(ArmLogicTreeNode):
2020-11-17 16:01:15 +01:00
"""Activates the output on the given mouse event."""
bl_idname = 'LNMergedMouseNode'
bl_label = 'Mouse'
2020-10-27 19:44:37 +01:00
arm_section = 'mouse'
arm_version = 1
2020-10-27 19:44:37 +01:00
2018-12-18 23:48:38 +01:00
property0: EnumProperty(
2020-11-17 16:01:15 +01:00
items = [('Started', 'Started', 'Started'),
('Down', 'Down', 'Down'),
2017-04-03 22:29:46 +02:00
('Released', 'Released', 'Released'),
('Moved', 'Moved', 'Moved')],
name='', default='Down')
2018-12-18 23:48:38 +01:00
property1: EnumProperty(
2020-11-17 16:01:15 +01:00
items = [('Left', 'Left', 'Left'),
('Middle', 'Middle', 'Middle'),
('Right', 'Right', 'Right')],
name='', default='Left')
2017-03-21 03:06:38 +01:00
def init(self, context):
super(MouseNode, 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')
2017-04-10 21:17:17 +02:00
layout.prop(self, 'property1')