MidnightControls 1.4.1 - Fix tooltips getting displaced

Fixes tooltips in inventories getting displaced when having the GUI scale set to something above 4.
This commit is contained in:
Motschen
2022-07-06 14:14:25 +02:00
parent 735b9e8718
commit 9891cd2977
3 changed files with 5 additions and 3 deletions

View File

@@ -86,12 +86,13 @@ public class MidnightControlsHud extends Hud {
if (this.client == null) return;
if (MidnightControlsConfig.controlsMode == ControlsMode.CONTROLLER && this.client.currentScreen == null) {
int y = bottom(2);
matrices.push();
if (scale != 1f) matrices.scale(scale,scale,scale);
this.renderFirstIcons(matrices, MidnightControlsConfig.hudSide == HudSide.LEFT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
this.renderSecondIcons(matrices, MidnightControlsConfig.hudSide == HudSide.RIGHT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
this.renderFirstSection(matrices, MidnightControlsConfig.hudSide == HudSide.LEFT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
this.renderSecondSection(matrices, MidnightControlsConfig.hudSide == HudSide.RIGHT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
if (scale != 1f) matrices.scale(1,1,1);
matrices.pop();
}
if (this.mod.reacharound.isLastReacharoundVertical()) {