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