forked from LeenkxTeam/LNXSDK
Webview for RunT/Krom
This commit is contained in:
26
leenkx/blender/lnx/logicnode/krom/LN_webview_dev_settings.py
Normal file
26
leenkx/blender/lnx/logicnode/krom/LN_webview_dev_settings.py
Normal file
@ -0,0 +1,26 @@
|
||||
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')
|
||||
Reference in New Issue
Block a user