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

24 lines
822 B
Python
Raw Normal View History

2020-09-20 20:10:01 +02:00
import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class GetCursorStateNode(ArmLogicTreeNode):
2020-10-05 19:55:56 +02:00
"""Returns the state of the mouse cursor.
2020-09-28 15:58:41 +02:00
@seeNode Set Cursor State
@output Is Hidden Locked: `true` if the mouse cursor is both hidden and locked.
@output Is Hidden: `true` if the mouse cursor is hidden.
@output Is Locked: `true` if the mouse cursor is locked."""
2020-09-20 20:10:01 +02:00
bl_idname = 'LNGetCursorStateNode'
bl_label = 'Get Cursor State'
2020-10-27 19:44:37 +01:00
arm_section = 'mouse'
2020-09-20 20:10:01 +02:00
arm_version = 1
def init(self, context):
super(GetCursorStateNode, self).init(context)
self.outputs.new('NodeSocketBool', 'Is Hidden Locked')
self.outputs.new('NodeSocketBool', 'Is Hidden')
self.outputs.new('NodeSocketBool', 'Is Locked')