1
0
forked from Onek8/LNXSDK
Files
LNXSDK/leenkx/blender/lnx/logicnode/krom/LN_webview_dev_settings.py
2026-07-13 15:44:52 -07:00

27 lines
931 B
Python

from lnx.logicnode.lnx_nodes import *
class WebviewDevSettingsNode(LnxLogicTreeNode):
"""Enables or disables developer settings for the given WebView"""
bl_idname = 'LNWebviewDevSettingsNode'
bl_label = 'Webview Dev Settings'
lnx_category = 'Krom Runtime'
lnx_section = 'webview'
lnx_version = 1
property0: HaxeEnumProperty(
'property0',
items=[('devtools', 'DevTools', 'Enable/disable developer tools'),
('context_menu', 'Context Menu', 'Enable/disable right-click context menu')],
name='Setting', default='devtools')
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxIntSocket', 'ID')
self.add_input('LnxBoolSocket', 'Enabled', default_value=True)
self.add_output('LnxNodeSocketAction', 'Out')
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')