Explorar o código

fixed textinput within mask

Nicolas Cannasse %!s(int64=3) %!d(string=hai) anos
pai
achega
60e66bc92f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      h2d/TextInput.hx

+ 1 - 1
h2d/TextInput.hx

@@ -372,7 +372,7 @@ class TextInput extends Text {
 	override function draw(ctx:RenderContext) {
 		if( inputWidth != null ) {
 			var h = localToGlobal(new h2d.col.Point(inputWidth, font.lineHeight));
-			ctx.pushRenderZone(absX, absY, h.x - absX, h.y - absY);
+			ctx.clipRenderZone(absX, absY, h.x - absX, h.y - absY);
 		}
 
 		if( cursorIndex >= 0 && (text != cursorText || cursorIndex != cursorXIndex) ) {