textfield fix

This commit is contained in:
2014-02-20 14:15:33 +04:00
parent 10ac32af62
commit 31b2417751

View File

@@ -1,5 +1,6 @@
package haxework.gui;
import flash.geom.Point;
import flash.text.TextFieldAutoSize;
import haxework.gui.core.HAlign;
import haxework.gui.core.VAlign;
@@ -151,6 +152,13 @@ class TextView extends SpriteView implements ITextView<Sprite, TextField> {
} else {
placeTextField(textField);
}
//ToDo:
var t:Point = content.localToGlobal(new Point(textField.x, textField.y));
t.x = Math.round(t.x);
t.y = Math.round(t.y);
t = content.globalToLocal(t);
textField.x = t.x;
textField.y = t.y;
super.update();
}