diff options
| author | shartte <shartte@users.noreply.github.com> | 2022-12-01 17:00:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-02 00:00:57 +0800 |
| commit | e0070afe923df8ed28ebdc2f3d60e0ab2746e32f (patch) | |
| tree | cd944f9e8d9a59c2828bd95eb841597b43288655 | |
| parent | 2123544fcf3ad7ec6d89e671a993a75737e3a44e (diff) | |
| download | RoughlyEnoughItems-e0070afe923df8ed28ebdc2f3d60e0ab2746e32f.tar.gz RoughlyEnoughItems-e0070afe923df8ed28ebdc2f3d60e0ab2746e32f.tar.bz2 RoughlyEnoughItems-e0070afe923df8ed28ebdc2f3d60e0ab2746e32f.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.
| -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 ba5b470f0..7a699e35f 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 @@ -127,8 +127,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(); @@ -157,8 +157,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(); |
