aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/DungeonTaskLevel.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java16
3 files changed, 20 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
index 8a48dd2c..7be94f86 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
@@ -572,7 +572,7 @@ public class BasicPage extends GuiProfileViewerPage {
);
}
- // sb lvlL
+ // sb lvl
int sbLevelX = guiLeft + 162;
int sbLevelY = guiTop + 90;
@@ -585,8 +585,8 @@ public class BasicPage extends GuiProfileViewerPage {
GlStateManager.scale(1.5f, 1.5f, 1);
Utils.drawItemStack(skull, 0, 0);
GlStateManager.popMatrix();
- Utils.drawStringScaled(skyblockLevelColour.toString() + (int) skyblockLevel, fr,
- sbLevelX - 2, sbLevelY - 15, true, 0, 1.5f
+ Utils.drawStringCenteredScaled(skyblockLevelColour.toString() + (int) skyblockLevel, fr,
+ sbLevelX + 9, sbLevelY - 12, true, 1.5f
);
float progress = (float) (skyblockLevel - (long) skyblockLevel);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/DungeonTaskLevel.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/DungeonTaskLevel.java
index 157c8362..6f0a029f 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/DungeonTaskLevel.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/DungeonTaskLevel.java
@@ -106,7 +106,7 @@ public class DungeonTaskLevel {
lore.add(levelPage.buildLore("Complete Dungeons", sbLevelGainedFloor, completeDungeon, false));
levelPage.renderLevelBar(
- "Dungeon",
+ "Dungeon Task",
NotEnoughUpdates.INSTANCE.manager
.createItemResolutionQuery()
.withKnownInternalName("WITHER_RELIC")
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
index 952eb50f..0424e311 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -1229,6 +1229,22 @@ public class Utils {
drawStringScaled(str, fr, x - len / 2, y - fontHeight / 2, shadow, colour, factor);
}
+ public static void drawStringCenteredScaled(
+ String str,
+ FontRenderer fr,
+ float x,
+ float y,
+ boolean shadow,
+ float factor
+ ) {
+ int strLen = fr.getStringWidth(str);
+
+ float x2 = x - strLen / 2f;
+ float y2 = y - fr.FONT_HEIGHT / 2f;
+
+ drawStringScaled(str, fr, x2, y2, shadow, 0, factor);
+ }
+
public static void drawStringCenteredYScaled(
String str,
FontRenderer fr,