Skip to content

Commit

Permalink
Fixed minor bug where subtitles were transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro270707 committed Jul 6, 2023
1 parent 584f257 commit a76f878
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ halplibe_version=1.1.4
pedrolibrary_version=1.0.4

# Mod
mod_version=1.0.0
mod_version=1.0.0.1
mod_group=net.pedroricardo
mod_name=subtitles
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@ public void renderGameOverlay(float partialTicks, boolean flag, int mouseX, int
width - (longestStringWidth / 2) - (fontrenderer.getStringWidth(stringToDraw) / 2) - sp - arrowWidth / 2,
height - 34 - (subtitleLines * lineHeight) - sp,
Color.intToIntARGB(
(int) (Math.min(60.0f, 20.0f + Subtitles.soundsPlaying.get(string)) * 255.0f / 70.0f), 255,
(int) (Math.min(70.0f, 20.0f + Subtitles.soundsPlaying.get(string)) * 255.0f / 70.0f), 255,
255, 255));

if (angleDegrees <= 325 && 215 <= angleDegrees) {
fontrenderer.drawString(">",
width - 6 - sp,
height - 34 - (subtitleLines * lineHeight) - sp,
Color.intToIntARGB(
(int) (Math.min(60.0f, 10.0f + Subtitles.soundsPlaying.get(string)) * 255.0f / 70.0f), 255,
(int) (Math.min(70.0f, 10.0f + Subtitles.soundsPlaying.get(string)) * 255.0f / 70.0f), 255,
255, 255));
} else if (angleDegrees >= 35 && 145 >= angleDegrees) {
fontrenderer.drawString("<",
width - longestStringWidth - sp - arrowWidth,
height - 34 - (subtitleLines * lineHeight) - sp,
Color.intToIntARGB(
(int) (Math.min(60.0f, 20.0f + Subtitles.soundsPlaying.get(string)) * 255.0f / 70.0f), 255,
(int) (Math.min(70.0f, 20.0f + Subtitles.soundsPlaying.get(string)) * 255.0f / 70.0f), 255,
255, 255));
}
} else {
Expand Down

0 comments on commit a76f878

Please sign in to comment.