mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 23:25:10 +01:00
Merge pull request #63 from TeamMidnightDust/1.19
Backport MidnightControls 1.4.1 to 1.18.2
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -63,6 +63,7 @@ public abstract class HandledScreenMixin implements HandledScreenAccessor {
|
||||
if (client.options.guiScale >= 4) {
|
||||
scale = 0.75f;
|
||||
} else scale = 1f;
|
||||
matrices.push();
|
||||
if (scale != 1f) matrices.scale(scale,scale,scale);
|
||||
int x = 2, y = (int) (client.getWindow().getScaledHeight() * (1 / scale) - 2 - MidnightControlsRenderer.ICON_SIZE);
|
||||
if (MidnightControlsCompat.isEMIPresent()) {
|
||||
@@ -81,7 +82,7 @@ public abstract class HandledScreenMixin implements HandledScreenAccessor {
|
||||
}
|
||||
x = MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_X}, "midnightcontrols.action.pickup", true, client);
|
||||
MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_Y}, "midnightcontrols.action.quick_move", true, client);
|
||||
if (scale != 1f) matrices.scale(1,1,1);
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user