Skip to content

Commit

Permalink
0.0°と0°のインジゲーターが重なった時の見た目を改善
Browse files Browse the repository at this point in the history
  • Loading branch information
graycat27 committed Mar 13, 2021
1 parent 3c3fa0d commit 7703627
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ private void initDisplayComponent(){
levelY = windowHeight / 2.0 - height;
}

String flightPitch = getDgrStringDecimal1(flightDegrees);
String flightPitch = (-0.1f < flightDegrees && flightDegrees < 0.1f) ?
getDgrString((int)flightDegrees) : getDgrStringDecimal1(flightDegrees);
String flightPitchText = String.format("> %s <", flightPitch);
int width = mc.fontRenderer.getStringWidth(flightPitchText);
speedPitchTextDisplay = new TextDisplay(posX, (int)(centerY - levelY),
Expand Down

0 comments on commit 7703627

Please sign in to comment.