On the latest OpenFL Lib.current.scaleX and Lib.current.scaleY works , but Toolkit.scale still not work for HaxeUI ( when add components directly to the stage).
Here are two screenshots using only OpenFL components :
-
Lib.current.scaleX == Lib.current.scaleY == 1
-
Lib.current.scaleX == Lib.current.scaleY == 2
My code is
var myText:TextField = new TextField();
myText.text = "This is my new text...";
myText.textColor = 0xff0000;
myText.x = 180;
myText.y = 60;
this.addChild( myText);
var button1:Sprite = new Sprite();
button1.graphics.beginFill(0xffff00);
button1.graphics.lineStyle(1,0xff0000);
button1.graphics.drawRect(0, 0, 120, 60);
button1.graphics.endFill();
button1.x = 20;
button1.y = 30;
this.addChild(button1);
var button2:Sprite = new Sprite();
button2.graphics.beginFill(0xab0084ff);
button2.graphics.lineStyle(1,0x00ff00);
button2.graphics.drawRect(0, 0, 80, 40);
button2.graphics.endFill();
button2.x = 200;
button2.y = 150;
this.addChild(button2);
and I set scale with
Lib.current.scaleX = 2;
Lib.current.scaleY = 2;

