quick fix : Multiple occurrences of the same expression

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent 173eab9a0e
commit aa1b25c8e5
2 files changed
+13 -19

No files matched your search

@@ -72,19 +72,18 @@ public class BattlesignGui extends GuiScreen {
float lum = calcLuminance(bgColR, bgColG, bgColB);
for (int i = 0; i < text.length; i++) {
final EnumChatFormatting chatFormatting = lum >= 35F
? EnumChatFormatting.BLACK
: lum >= 31F ? EnumChatFormatting.GRAY : EnumChatFormatting.WHITE;
fontRendererObj.drawString(
(lum >= 35F
? EnumChatFormatting.BLACK
: lum >= 31F ? EnumChatFormatting.GRAY : EnumChatFormatting.WHITE)
chatFormatting
+ (i == currentLine ? "> " : "")
+ text[i]
+ (i == currentLine
? " \u00A7r"
+ (lum >= 35F
? EnumChatFormatting.BLACK
: lum >= 31F ? EnumChatFormatting.GRAY : EnumChatFormatting.WHITE)
+ "<"
: ""),
? " " + EnumChatFormatting.RESET
+ chatFormatting
+ "<"
: ""),
k
- fontRendererObj.getStringWidth(
(i == currentLine ? "> " : "") + text[i] + (i == currentLine ? " <" : ""))