1
0
forked from Clones/Controlify

compound binds, complete vanilla compat, better vmouse screen handling, controller uuid, beta notice screen, configurable movement keys, vmouse shift key, icon, optimize controller save/load

This commit is contained in:
isXander
2023-02-05 14:55:20 +00:00
parent 9c7972c971
commit 6c5108469c
62 changed files with 831 additions and 137 deletions

View File

@ -9,10 +9,12 @@ import net.minecraft.client.gui.GuiComponent;
public class ButtonRenderer {
public static final int BUTTON_SIZE = 22;
public static void drawButton(Bind button, Controller controller, PoseStack poseStack, int x, int y, int size) {
public static void drawButton(Bind button, Controller controller, PoseStack poseStack, int x, int centerY) {
RenderSystem.setShaderTexture(0, button.textureLocation(controller));
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
GuiComponent.blit(poseStack, x - size / 2, y - size / 2, 0, 0, BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE);
GuiComponent.blit(poseStack, x, centerY - BUTTON_SIZE / 2, 0, 0, BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE);
}
public record DrawSize(int width, int height) { }
}