ncannasse пре 10 година
родитељ
комит
2d21f3b919
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 1 1
      h2d/comp/Context.hx
  2. 3 3
      h2d/comp/Input.hx

+ 1 - 1
h2d/comp/Context.hx

@@ -18,7 +18,7 @@ class Context {
 
 	// ------------- STATIC API ---------------------------------------
 
-	public static function getFont( name : String, size : Int ) {
+	public dynamic static function getFont( name : String, size : Int ) {
 		return hxd.res.FontBuilder.getFont(name, size);
 	}
 

+ 3 - 3
h2d/comp/Input.hx

@@ -6,8 +6,8 @@ class Input extends Interactive {
 
 	var tf : h2d.Text;
 	var cursor : h2d.Bitmap;
-	var cursorPos(default,set) : Int;
-
+	var cursorPos(default, set) : Int;
+	public var filter = true;
 	public var value(default, set) : String;
 
 	public function new(?parent) {
@@ -95,7 +95,7 @@ class Input extends Interactive {
 			tf.font = getFont();
 			tf.textColor = style.color;
 			tf.text = value;
-			tf.filter = true;
+			tf.filter = filter;
 			textAlign(tf);
 			contentWidth = tf.textWidth;
 			contentHeight = tf.textHeight;