diff options
author | Aaron <51387595+AzureAaron@users.noreply.github.com> | 2023-06-09 16:30:27 -0400 |
---|---|---|
committer | Aaron <51387595+AzureAaron@users.noreply.github.com> | 2023-06-09 16:30:27 -0400 |
commit | d2b4abdeccbb1f567840cfa1038fedf8cb7aed7e (patch) | |
tree | 46561295b6a53fa74b996bd3d346de9aae8347ff /src/main/java/me/xmrvizzy | |
parent | 97384423da03f5d85ed5ec62a16f80d40f109b74 (diff) | |
download | Skyblocker-d2b4abdeccbb1f567840cfa1038fedf8cb7aed7e.tar.gz Skyblocker-d2b4abdeccbb1f567840cfa1038fedf8cb7aed7e.tar.bz2 Skyblocker-d2b4abdeccbb1f567840cfa1038fedf8cb7aed7e.zip |
Support the scaling option for the placement screen!
Diffstat (limited to 'src/main/java/me/xmrvizzy')
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java | 4 | ||||
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java index 6aaee632..e5441b5c 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java @@ -51,8 +51,10 @@ public class DungeonMap { } public static void renderHUDMap(MatrixStack matrices, int x, int y) { + float scaling = SkyblockerConfig.get().locations.dungeons.mapScaling; + int size = (int) (128 * scaling); RenderSystem.setShaderTexture(0, MAP_BACKGROUND); - DrawableHelper.drawTexture(matrices, x, y, 0, 0, 64, 64, 64, 64); + DrawableHelper.drawTexture(matrices, x, y, 0, 0, size, size, size, size); } public static void init() { diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java index d0f36a69..9d97e24d 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java @@ -28,9 +28,11 @@ public class DungeonMapConfigScreen extends Screen { @Override public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) { - if(RenderUtils.pointExistsInArea((int) mouseX, (int) mouseY, hudX, hudY, hudX + 64, hudY + 64) && button == 0) { - hudX = (int) Math.max(Math.min(mouseX - 32, this.width - 64), 0); - hudY = (int) Math.max(Math.min(mouseY - 32, this.height - 64), 0); + float scaling = SkyblockerConfig.get().locations.dungeons.mapScaling; + int size = (int) (128 * scaling); + if(RenderUtils.pointExistsInArea((int) mouseX, (int) mouseY, hudX, hudY, hudX + size, hudY + size) && button == 0) { + hudX = (int) Math.max(Math.min(mouseX - (size / 2), this.width - size), 0); + hudY = (int) Math.max(Math.min(mouseY - (size / 2), this.height - size), 0); } return super.mouseDragged(mouseX, mouseY, button, deltaX, deltaY); } |