forked from Onek8/LNXSDK
34 lines
782 B
Haxe
34 lines
782 B
Haxe
package leenkx.logicnode;
|
|
|
|
class WebviewSetDimensionsNode extends LogicNode {
|
|
|
|
public var property0: String;
|
|
|
|
public function new(tree: LogicTree) {
|
|
super(tree);
|
|
}
|
|
|
|
override function run(from: Int) {
|
|
#if kha_krom
|
|
var id: Int = inputs[1].get();
|
|
switch (property0) {
|
|
case "resize":
|
|
var width: Int = inputs[2].get();
|
|
var height: Int = inputs[3].get();
|
|
Krom.webviewResize(id, width, height);
|
|
case "move":
|
|
var x: Int = inputs[2].get();
|
|
var y: Int = inputs[3].get();
|
|
Krom.webviewMove(id, x, y);
|
|
case "set_bounds":
|
|
var x: Int = inputs[2].get();
|
|
var y: Int = inputs[3].get();
|
|
var width: Int = inputs[4].get();
|
|
var height: Int = inputs[5].get();
|
|
Krom.webviewSetBounds(id, x, y, width, height);
|
|
}
|
|
#end
|
|
runOutput(0);
|
|
}
|
|
}
|