Исходник KeyStrokes HudFunction | Expensive 2.0

Начинающий
Статус
Оффлайн
Регистрация
16 Дек 2023
Сообщения
447
Реакции[?]
8
Поинты[?]
4K
хах на свою тему с убогим вт посмотри далбаёб нет я не говорю что ваще гавно нахуй ты даже в каком-то смысле молодец ты самый первый кто напастил вт на экспу 3.1 и слил на юг но у тебя там хуйня а не вт кривая помойка
1712494929195.png
ищи-ищи дальше,за бесплатно точно найдешь :Jebaited: То что твоя паста окажется на юг за 0.0001 секунду
 
Начинающий
Статус
Оффлайн
Регистрация
5 Апр 2023
Сообщения
389
Реакции[?]
1
Поинты[?]
2K
Начинающий
Статус
Онлайн
Регистрация
19 Янв 2024
Сообщения
63
Реакции[?]
0
Поинты[?]
0
Сижу в войсе с другом и он говорит а слей свой супер кейстрокес написанный за 5 минут на юг, ну а я послушался и вот они тут т.к у меня молил уже Wermitist чтобы я дал ему :roflanEbalo:

Ладно код ниже

Код:
public Dragging keyStrokes = Main.createDrag(this, "KeyStrokes", 200, 50);
    private void onNotif(MatrixStack stack) {
        float posX = this.keyStrokes.getX() + 5.0F;
        float posY = this.keyStrokes.getY() - 28.0F;
        int offset = 10;
        int headerHeight = 45;
        int width = 70;
        float height = (float)(this.activeModules * offset);
        int firstColor = ColorUtil.getColorStyle(0.0F);
        int secondColor = ColorUtil.getColorStyle(90.0F);
        this.heightDynamic = AnimationMath.fast(this.heightDynamic, height, 10.0F);
        int keyPressedW = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 87);
        int keyPressedS = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 83);
        int keyPressedA = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 65);
        int keyPressedD = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 68);
        int keyPressedSPACE = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 32);
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F, posY + 13.5F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F - 19.0F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F + 19.0F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F - 19.0F, posY + 32.0F + 18.0F, 56.0F, 15.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        if (keyPressedW == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F, posY + 14.9F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedS == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedA == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F - 19.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedD == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F + 19.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedSPACE == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F - 19.0F, posY + 33.4F + 18.0F, 53.0F, 12.2F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        Fonts.sfbold[19].drawCenteredString(stack, "W", (double)(posX + 38.0F), (double)(posY + 19.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "A", (double)(posX - 19.0F + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "S", (double)(posX + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "D", (double)(posX + 19.0F + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "SPACE", (double)(posX + 38.0F), (double)(posY + 18.0F + 20.0F + 15.5F), -1);
        this.keyStrokes.setWidth((float)width);
        this.keyStrokes.setHeight((float)headerHeight);
    }

SS: Посмотреть вложение 274171
ДА КАК ПАСТИТЬ ЭТО ЫЫЫ Я ЖИ ПАСТИР
 
Начинающий
Статус
Оффлайн
Регистрация
15 Сен 2023
Сообщения
4
Реакции[?]
0
Поинты[?]
0
Сижу в войсе с другом и он говорит а слей свой супер кейстрокес написанный за 5 минут на юг, ну а я послушался и вот они тут т.к у меня молил уже Wermitist чтобы я дал ему :roflanEbalo:

Ладно код ниже

Код:
public Dragging keyStrokes = Main.createDrag(this, "KeyStrokes", 200, 50);
    private void onNotif(MatrixStack stack) {
        float posX = this.keyStrokes.getX() + 5.0F;
        float posY = this.keyStrokes.getY() - 28.0F;
        int offset = 10;
        int headerHeight = 45;
        int width = 70;
        float height = (float)(this.activeModules * offset);
        int firstColor = ColorUtil.getColorStyle(0.0F);
        int secondColor = ColorUtil.getColorStyle(90.0F);
        this.heightDynamic = AnimationMath.fast(this.heightDynamic, height, 10.0F);
        int keyPressedW = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 87);
        int keyPressedS = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 83);
        int keyPressedA = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 65);
        int keyPressedD = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 68);
        int keyPressedSPACE = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 32);
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F, posY + 13.5F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F - 19.0F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F + 19.0F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F - 19.0F, posY + 32.0F + 18.0F, 56.0F, 15.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        if (keyPressedW == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F, posY + 14.9F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedS == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedA == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F - 19.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedD == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F + 19.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedSPACE == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F - 19.0F, posY + 33.4F + 18.0F, 53.0F, 12.2F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        Fonts.sfbold[19].drawCenteredString(stack, "W", (double)(posX + 38.0F), (double)(posY + 19.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "A", (double)(posX - 19.0F + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "S", (double)(posX + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "D", (double)(posX + 19.0F + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "SPACE", (double)(posX + 38.0F), (double)(posY + 18.0F + 20.0F + 15.5F), -1);
        this.keyStrokes.setWidth((float)width);
        this.keyStrokes.setHeight((float)headerHeight);
    }

SS: Посмотреть вложение 274171
ГОВНО КОД! Вместо того чтобы многократно рендерить одно и то же, гораздо эффективнее использовать математику для рендера надписей и клавиш. Создание массивов для этого проще и лучше. Затем можно перечислить все элементы. В конечном итоге, математика значительно облегчает процесс!
 
Начинающий
Статус
Оффлайн
Регистрация
14 Июн 2023
Сообщения
77
Реакции[?]
0
Поинты[?]
0
Сижу в войсе с другом и он говорит а слей свой супер кейстрокес написанный за 5 минут на юг, ну а я послушался и вот они тут т.к у меня молил уже Wermitist чтобы я дал ему :roflanEbalo:

Ладно код ниже

Код:
public Dragging keyStrokes = Main.createDrag(this, "KeyStrokes", 200, 50);
    private void onNotif(MatrixStack stack) {
        float posX = this.keyStrokes.getX() + 5.0F;
        float posY = this.keyStrokes.getY() - 28.0F;
        int offset = 10;
        int headerHeight = 45;
        int width = 70;
        float height = (float)(this.activeModules * offset);
        int firstColor = ColorUtil.getColorStyle(0.0F);
        int secondColor = ColorUtil.getColorStyle(90.0F);
        this.heightDynamic = AnimationMath.fast(this.heightDynamic, height, 10.0F);
        int keyPressedW = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 87);
        int keyPressedS = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 83);
        int keyPressedA = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 65);
        int keyPressedD = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 68);
        int keyPressedSPACE = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 32);
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F, posY + 13.5F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F - 19.0F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F + 19.0F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        RenderUtil.Render2D.drawRoundedRect(posX + 29.5F - 19.0F, posY + 32.0F + 18.0F, 56.0F, 15.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
        if (keyPressedW == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F, posY + 14.9F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedS == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedA == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F - 19.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedD == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F + 19.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        if (keyPressedSPACE == 1) {
            RenderUtil.Render2D.drawGradientRound(posX + 31.0F - 19.0F, posY + 33.4F + 18.0F, 53.0F, 12.2F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
        }

        Fonts.sfbold[19].drawCenteredString(stack, "W", (double)(posX + 38.0F), (double)(posY + 19.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "A", (double)(posX - 19.0F + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "S", (double)(posX + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "D", (double)(posX + 19.0F + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
        Fonts.sfbold[19].drawCenteredString(stack, "SPACE", (double)(posX + 38.0F), (double)(posY + 18.0F + 20.0F + 15.5F), -1);
        this.keyStrokes.setWidth((float)width);
        this.keyStrokes.setHeight((float)headerHeight);
    }

SS: Посмотреть вложение 274171
5 ректов, 5 ифов, еще 5 ректов клиент колором, рендер текста, смысл сливать это
 
Начинающий
Статус
Оффлайн
Регистрация
22 Дек 2023
Сообщения
9
Реакции[?]
0
Поинты[?]
0
ГОВНО КОД! Вместо того чтобы многократно рендерить одно и то же, гораздо эффективнее использовать математику для рендера надписей и клавиш. Создание массивов для этого проще и лучше. Затем можно перечислить все элементы. В конечном итоге, математика значительно облегчает процесс!
Создания массивов? Только массивов чего? Квадратов? И какая здесь интересно математика в создании и перечислении 5 элементов массива?
 
Сверху Снизу