armory/Sources/armory/logicnode/ShowMouseNode.hx

16 lines
299 B
Haxe
Raw Normal View History

2018-05-16 12:17:16 +02:00
package armory.logicnode;
class ShowMouseNode extends LogicNode {
public function new(tree:LogicTree) {
super(tree);
}
2018-10-22 10:10:33 +02:00
override function run(from:Int) {
2018-05-16 12:17:16 +02:00
var show:Bool = inputs[1].get();
var mouse = iron.system.Input.getMouse();
show ? mouse.show() : mouse.hide();
2018-10-22 10:10:33 +02:00
runOutput(0);
2018-05-16 12:17:16 +02:00
}
}