diff options
| author | shartte <shartte@users.noreply.github.com> | 2022-12-01 17:00:57 +0100 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2023-05-29 21:20:22 +0800 |
| commit | ef17b366f2a2c3ec99054703b87f259f3229090e (patch) | |
| tree | 7168d3f2fa6a024d77c5197a26981d892073ffa8 /runtime/src/main/java/me | |
| parent | 95198ac0acab805c573339f6531085a782c35bd7 (diff) | |
| download | RoughlyEnoughItems-ef17b366f2a2c3ec99054703b87f259f3229090e.tar.gz RoughlyEnoughItems-ef17b366f2a2c3ec99054703b87f259f3229090e.tar.bz2 RoughlyEnoughItems-ef17b366f2a2c3ec99054703b87f259f3229090e.zip | |
Fix jittery dashed lines around favorite widget (#1229)
The dashed lines use a 7 pixel pattern while the calculations for the offset / phase use 6. This causes a slight "jitter" every 600ms.
Diffstat (limited to 'runtime/src/main/java/me')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/favorites/history/DisplayHistoryWidget.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/favorites/history/DisplayHistoryWidget.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/favorites/history/DisplayHistoryWidget.java index 6e905cd4f..3b434b9b1 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/favorites/history/DisplayHistoryWidget.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/favorites/history/DisplayHistoryWidget.java @@ -130,8 +130,8 @@ public class DisplayHistoryWidget extends WidgetWithBounds implements DraggableC } private void drawHorizontalDashedLine(PoseStack poses, int x1, int x2, int y, int color, boolean reverse) { - float offset = (System.currentTimeMillis() % 600) / 100.0F; - if (!reverse) offset = 6 - offset; + float offset = (System.currentTimeMillis() % 700) / 100.0F; + if (!reverse) offset = 7 - offset; RenderSystem.disableTexture(); RenderSystem.enableBlend(); @@ -159,8 +159,8 @@ public class DisplayHistoryWidget extends WidgetWithBounds implements DraggableC } private void drawVerticalDashedLine(PoseStack poses, int x, int y1, int y2, int color, boolean reverse) { - float offset = (System.currentTimeMillis() % 600) / 100.0F; - if (!reverse) offset = 6 - offset; + float offset = (System.currentTimeMillis() % 700) / 100.0F; + if (!reverse) offset = 7 - offset; RenderSystem.disableTexture(); RenderSystem.enableBlend(); |
