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

25 lines
801 B
Python

from lnx.logicnode.lnx_nodes import *
class WebviewNavigationStateNode(LnxLogicTreeNode):
"""Checks the navigation state of the given WebView"""
bl_idname = 'LNWebviewNavigationStateNode'
bl_label = 'Webview Navigation State'
lnx_category = 'Krom Runtime'
lnx_section = 'webview'
lnx_version = 1
property0: HaxeEnumProperty(
'property0',
items=[('can_go_back', 'Can Go Back', 'Check if can navigate back'),
('can_go_forward', 'Can Go Forward', 'Check if can navigate forward')],
name='Check', default='can_go_back')
def lnx_init(self, context):
self.add_input('LnxIntSocket', 'ID')
self.add_output('LnxBoolSocket', 'State')
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')