Fixed blue stroke on GuiKeyframeTimeline possibly exceeding the Timeline's bounds | https://trello.com/c/IfTtmwso/

This commit is contained in:
CrushedPixel
2015-07-13 15:18:32 +02:00
parent ff5481822a
commit 3eca70fea4

View File

@@ -146,7 +146,7 @@ public class GuiKeyframeTimeline extends GuiTimeline {
int keyframeX = getKeyframeX(kf.getRealTimestamp(), leftTime, bodyWidth, segmentLength); int keyframeX = getKeyframeX(kf.getRealTimestamp(), leftTime, bodyWidth, segmentLength);
int nextX = getKeyframeX(nextSpectatorKeyframeRealTime, leftTime, bodyWidth, segmentLength); int nextX = getKeyframeX(nextSpectatorKeyframeRealTime, leftTime, bodyWidth, segmentLength);
drawGradientRect(keyframeX + 2, positionY + BORDER_TOP + 1, nextX - 2, positionY + BORDER_TOP + 4, 0xFF0080FF, 0xFF0080FF); drawGradientRect(Math.max(keyframeX + 2, positionX+BORDER_LEFT), positionY + BORDER_TOP + 1, Math.min(nextX - 2, positionX+width-BORDER_RIGHT+1), positionY + BORDER_TOP + 4, 0xFF0080FF, 0xFF0080FF);
} }
} }
} }