Nicolas Cannasse %!s(int64=8) %!d(string=hai) anos
pai
achega
3306a91679
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      h2d/Slider.hx

+ 1 - 1
h2d/Slider.hx

@@ -43,7 +43,7 @@ class Slider extends h2d.Interactive {
 	override function draw(ctx:RenderContext) {
 		super.draw(ctx);
 		emitTile(ctx, tile);
-		var px = Math.round( (value - minValue) * width / (maxValue - minValue) );
+		var px = Math.round( (value - minValue) * (width - cursorTile.width) / (maxValue - minValue) ) - cursorTile.dx;
 		cursorTile.dx += px;
 		emitTile(ctx, cursorTile);
 		cursorTile.dx -= px;