aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java
diff options
context:
space:
mode:
authorolim <bobq4582@gmail.com>2024-01-31 15:23:53 +0000
committerolim <bobq4582@gmail.com>2024-01-31 15:23:53 +0000
commit7076875f3b9b513a569760f5890202e260fc6bd7 (patch)
tree14c93e874ec500d9896560391c64116002d17d2b /src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java
parent465c46d1f3dde2474fc1595033e2eab4e7286433 (diff)
downloadSkyblocker-7076875f3b9b513a569760f5890202e260fc6bd7.tar.gz
Skyblocker-7076875f3b9b513a569760f5890202e260fc6bd7.tar.bz2
Skyblocker-7076875f3b9b513a569760f5890202e260fc6bd7.zip
comments and desriptions
add more comments to new code and added Tooltips to the new options in the config menu
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java
index e7ffe362..fb055b87 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java
@@ -67,7 +67,12 @@ public class DwarvenHud {
});
}
- public static Pair<IntIntPair,IntIntPair> getDimForConfig(List<Commission> commissions) { //todo add powder
+ /**
+ * Gets the dimensions (width, height) for the commissions hud and the powder hud
+ * @param commissions what commissions to get the dimensions for
+ * @return a {@link Pair} of {@link IntIntPair} with the first pair being for the commissions hud and the second pair being for the powder hud
+ */
+ public static Pair<IntIntPair,IntIntPair> getDimForConfig(List<Commission> commissions) {
return switch (SkyblockerConfigManager.get().locations.dwarvenMines.dwarvenHud.style) {
case SIMPLE -> {
HudCommsWidget.INSTANCE_CFG.updateData(commissions, false);
@@ -111,6 +116,15 @@ public class DwarvenHud {
}
}
+ /**
+ * Renders hud to window without using the widget rendering
+ * @param context DrawContext to draw the hud to
+ * @param comHudX X coordinate of the commissions hud
+ * @param comHudY Y coordinate of the commissions hud
+ * @param powderHudX X coordinate of the powder hud
+ * @param powderHudY Y coordinate of the powder hud
+ * @param commissions the commissions to render to the commissions hud
+ */
public static void renderClassic(DrawContext context, int comHudX, int comHudY, int powderHudX, int powderHudY, List<Commission> commissions) {
if (SkyblockerConfigManager.get().locations.dwarvenMines.dwarvenHud.enableBackground) {
context.fill(comHudX, comHudY, comHudX + 200, comHudY + (20 * commissions.size()), 0x64000000);