Update Files

This commit is contained in:
2025-01-22 16:18:30 +01:00
parent ed4603cf95
commit a36294b518
16718 changed files with 2960346 additions and 0 deletions

View File

@ -0,0 +1,28 @@
package leenkx.logicnode;
import iron.Scene;
import leenkx.trait.internal.CanvasScript;
class CanvasGetInputTextNode extends LogicNode {
var canvas: CanvasScript;
public function new(tree: LogicTree) {
super(tree);
}
#if lnx_ui
override function get(from: Int) {
if (canvas == null) canvas = Scene.active.getTrait(CanvasScript);
if (canvas == null) canvas = Scene.active.camera.getTrait(CanvasScript);
if (canvas == null || !canvas.ready) return null;
// This Try/Catch hacks around an issue where the handles are
// not created yet, even though canvas.ready is true.
try {
return canvas.getHandle(inputs[0].get()).text;
}
catch (e: Dynamic) { return null; }
}
#end
}