Files
LNXSDK/leenkx/blender/lnx/logicnode/krom/LN_webview_window_actions.py
2026-07-13 15:44:52 -07:00

27 lines
889 B
Python

from lnx.logicnode.lnx_nodes import *
class WebviewWindowActionsNode(LnxLogicTreeNode):
"""Performs a window action on the given WebView's detached window"""
bl_idname = 'LNWebviewWindowActionsNode'
bl_label = 'Webview Window Actions'
lnx_category = 'Krom Runtime'
lnx_section = 'webview'
lnx_version = 1
property0: HaxeEnumProperty(
'property0',
items=[('minimize', 'Minimize', 'Minimize the window'),
('maximize', 'Maximize', 'Maximize the window'),
('restore', 'Restore', 'Restore the window')],
name='Action', default='restore')
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxIntSocket', 'ID')
self.add_output('LnxNodeSocketAction', 'Out')
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')