forked from LeenkxTeam/LNXSDK
27 lines
889 B
Python
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')
|