From 40fc96166d7e9b6aa631dc8cd82453e4950f5da5 Mon Sep 17 00:00:00 2001 From: t3du <32546729+t3du@users.noreply.github.com> Date: Thu, 26 Dec 2024 19:14:10 -0300 Subject: [PATCH] Add files via upload --- armory/Sources/armory/logicnode/LoadUrlNode.hx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/armory/Sources/armory/logicnode/LoadUrlNode.hx b/armory/Sources/armory/logicnode/LoadUrlNode.hx index 7bf8854994..f68fe39dd6 100644 --- a/armory/Sources/armory/logicnode/LoadUrlNode.hx +++ b/armory/Sources/armory/logicnode/LoadUrlNode.hx @@ -11,6 +11,20 @@ class LoadUrlNode extends LogicNode { } override function run(from: Int) { - System.loadUrl(inputs[1].get()); + //System.loadUrl(inputs[1].get()); + + #if kha_html5 + if (inputs[2].get()){ + var window = inputs[3].get() ? js.Browser.window.open(inputs[1].get(), "_blank", "width="+inputs[4].get()+",height="+inputs[5].get()+",left="+inputs[6].get()+",top="+inputs[7].get()) + : js.Browser.window.open(inputs[1].get(), "_blank"); + + if(window != null) + runOutput(0); + else + runOutput(1); + } + else + js.Browser.window.open(inputs[1].get(), "_self"); + #end } }