-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
183 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/client/java/com/github/outsiderh/doabarrelrollwithhud/renderer/AltitudeIndicator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.github.outsiderh.doabarrelrollwithhud.renderer; | ||
|
||
import com.github.outsiderh.doabarrelrollwithhud.DoABarrelRollWithHud; | ||
import com.github.outsiderh.doabarrelrollwithhud.utils.Vector2Int; | ||
|
||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
|
||
public class AltitudeIndicator extends Renderer { | ||
@Override | ||
public void render(MinecraftClient client, MatrixStack mat) { | ||
Vector2Int altitudePos = new Vector2Int(hudEnd.x, (hudBegin.y + hudEnd.y) / 2); | ||
drawTextWithFixedBox(client.textRenderer, mat, String.format("%.1f", DoABarrelRollWithHud.fc.altitudeInUnit()), color, altitudePos, TextAlign.Left, "xxxx.x"); | ||
drawVerticalLine(mat, hudEnd.x, hudBegin.y, hudEnd.y, color); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
src/client/java/com/github/outsiderh/doabarrelrollwithhud/renderer/TextAlign.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
package com.github.outsiderh.doabarrelrollwithhud.renderer; | ||
|
||
public enum TextAlign { | ||
UpLeft, | ||
Up, | ||
UpRight, | ||
Left, | ||
Middle, | ||
Right | ||
Central, | ||
Right, | ||
DownLeft, | ||
Down, | ||
DownRight | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters