Визуальная часть Relake Skid KeyBinds | Exp 3.1 base

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
1 Авг 2024
Сообщения
414
Реакции
0
Выберите загрузчик игры
  1. OptiFine

Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:

  • бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
  • маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
  • приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
  • обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.

Спасибо!

красивые бинды релейка, пытался сделать чето чуть чуть похожее, вышло 50\50

Релейка
1746716379911.png


Мое
1746716344723.png


Code
Код:
Expand Collapse Copy
package fun.demure.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import fun.demure.Demure;
import fun.demure.events.EventDisplay;
import fun.demure.functions.api.Function;
import fun.demure.ui.display.ElementRenderer;
import fun.demure.ui.styles.Style;
import fun.demure.utils.client.KeyStorage;
import fun.demure.utils.drag.Dragging;
import fun.demure.utils.math.MathUtil;
import fun.demure.utils.math.Vector4i;
import fun.demure.utils.render.ColorUtils;
import fun.demure.utils.render.DisplayUtils;
import fun.demure.utils.render.KawaseBlur;
import fun.demure.utils.render.Scissor;
import fun.demure.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.math.vector.Vector4f;

import java.util.Locale;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class KeyBindRenderer implements ElementRenderer {

    final Dragging dragging;

    float width;
    float height;


    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        KawaseBlur.blur.updateBlur(1, 1);


        final float posX = dragging.getX();
        final float posY = dragging.getY();
        final float currentWidth = width;
        final float currentHeight = height-2.5f;

        float fontSize = 7f;
        float padding = 5;
        Style style = Demure.getInstance().getStyleManager().getCurrentStyle();
        String name = "Keybinds";

        KawaseBlur.blur.render(() -> {
            DisplayUtils.drawRoundedRect(posX-1.5f, posY-0.5f, currentWidth+2, currentHeight, 6, ColorUtils.rgba(25,25,25,120));
        });

        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(style.getFirstColor().getRGB(), 195),style.getFirstColor().getRGB(),style.getFirstColor().getRGB(),style.getFirstColor().getRGB());
        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(ColorUtils.rgb(0,0,0), 105),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0));

        DisplayUtils.drawGradientRound(posX-1.5f+1, posY-0.5f, currentWidth, currentHeight, 6,ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170));
        float fixYs = posY+16;
        DisplayUtils.drawRoundedRect(posX-1f, fixYs - 1.5f, currentWidth+1,currentHeight-14.5f,new Vector4f(0,6,0,6), ColorUtils.rgba(0,0,0,55));
        Scissor.push();
        Scissor.setFromComponentCoordinates(posX, posY-0.5f, currentWidth, currentHeight);
        Fonts.relbold.drawText(ms, name, posX+4, posY-1 +4.5f, ColorUtils.rgb(255,255,255), 7.5f, .08f);

        fun.demure.utils.font.Fonts.icons1[16].drawString(ms, "C", posX+currentWidth/1.2f, posY-1 + 7, style.getFirstColor().getRGB());

        float renderPosY = posY + fontSize + padding * 2;
        float maxWidth = Fonts.sflight.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        renderPosY += 3f;

        for (Function f : Demure.getInstance().getFunctionRegistry().getFunctions()) {

            f.getAnimation().update();
            if (!(f.getAnimation().getValue() > 0) || f.getBind() == 0) continue;
            String nameText = f.getName();
            float nameWidth = Fonts.sflight.getWidth(nameText, fontSize);

            String bindText = "[" + KeyStorage.getKey(f.getBind()) + "]";
            float bindWidth = Fonts.sflight.getWidth(bindText, fontSize);

            float localWidth = nameWidth + bindWidth + padding * 3;

            Fonts.sflight.drawText(ms, nameText, posX-1 + padding, renderPosY - 1.5f,
                    ColorUtils.rgba(255,255,255, (int) (190 * f.getAnimation().getValue())), 7f, .17f);
            Fonts.sflight.drawText(ms, bindText, posX-2 + currentWidth - padding - bindWidth+2, renderPosY - 1.5f,
                    style.getFirstColor().getRGB(), 7f, .13f);

            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            renderPosY += (float) ((fontSize + padding) * f.getAnimation().getValue());
            localHeight += (float) ((fontSize + padding) * f.getAnimation().getValue());
        }
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80);
        this.height = localHeight + 2.5f;
        dragging.setWidth(this.width);
        dragging.setHeight(this.height);
    }

}

вот фулл худ, если надо, ликну
1746716456734.png
 
Последнее редактирование:
топ братиш, но мне такое не заходит
 
не похоже
 
красивые бинды релейка, пытался сделать чето чуть чуть похожее, вышло 50\50

Релейка
Посмотреть вложение 305844

Мое
Посмотреть вложение 305843

Code
Код:
Expand Collapse Copy
package fun.demure.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import fun.demure.Demure;
import fun.demure.events.EventDisplay;
import fun.demure.functions.api.Function;
import fun.demure.ui.display.ElementRenderer;
import fun.demure.ui.styles.Style;
import fun.demure.utils.client.KeyStorage;
import fun.demure.utils.drag.Dragging;
import fun.demure.utils.math.MathUtil;
import fun.demure.utils.math.Vector4i;
import fun.demure.utils.render.ColorUtils;
import fun.demure.utils.render.DisplayUtils;
import fun.demure.utils.render.KawaseBlur;
import fun.demure.utils.render.Scissor;
import fun.demure.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.math.vector.Vector4f;

import java.util.Locale;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class KeyBindRenderer implements ElementRenderer {

    final Dragging dragging;

    float width;
    float height;


    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        KawaseBlur.blur.updateBlur(1, 1);


        final float posX = dragging.getX();
        final float posY = dragging.getY();
        final float currentWidth = width;
        final float currentHeight = height-2.5f;

        float fontSize = 7f;
        float padding = 5;
        Style style = Demure.getInstance().getStyleManager().getCurrentStyle();
        String name = "Keybinds";

        KawaseBlur.blur.render(() -> {
            DisplayUtils.drawRoundedRect(posX-1.5f, posY-0.5f, currentWidth+2, currentHeight, 6, ColorUtils.rgba(25,25,25,120));
        });

        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(style.getFirstColor().getRGB(), 195),style.getFirstColor().getRGB(),style.getFirstColor().getRGB(),style.getFirstColor().getRGB());
        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(ColorUtils.rgb(0,0,0), 105),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0));

        DisplayUtils.drawGradientRound(posX-1.5f+1, posY-0.5f, currentWidth, currentHeight, 6,ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170));
        float fixYs = posY+16;
        DisplayUtils.drawRoundedRect(posX-1f, fixYs - 1.5f, currentWidth+1,currentHeight-14.5f,new Vector4f(0,6,0,6), ColorUtils.rgba(0,0,0,55));
        Scissor.push();
        Scissor.setFromComponentCoordinates(posX, posY-0.5f, currentWidth, currentHeight);
        Fonts.relbold.drawText(ms, name, posX+4, posY-1 +4.5f, ColorUtils.rgb(255,255,255), 7.5f, .08f);

        fun.demure.utils.font.Fonts.icons1[16].drawString(ms, "C", posX+currentWidth/1.2f, posY-1 + 7, style.getFirstColor().getRGB());

        float renderPosY = posY + fontSize + padding * 2;
        float maxWidth = Fonts.sflight.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        renderPosY += 3f;

        for (Function f : Demure.getInstance().getFunctionRegistry().getFunctions()) {

            f.getAnimation().update();
            if (!(f.getAnimation().getValue() > 0) || f.getBind() == 0) continue;
            String nameText = f.getName();
            float nameWidth = Fonts.sflight.getWidth(nameText, fontSize);

            String bindText = "[" + KeyStorage.getKey(f.getBind()) + "]";
            float bindWidth = Fonts.sflight.getWidth(bindText, fontSize);

            float localWidth = nameWidth + bindWidth + padding * 3;

            Fonts.sflight.drawText(ms, nameText, posX-1 + padding, renderPosY - 1.5f,
                    ColorUtils.rgba(255,255,255, (int) (190 * f.getAnimation().getValue())), 7f, .17f);
            Fonts.sflight.drawText(ms, bindText, posX-2 + currentWidth - padding - bindWidth+2, renderPosY - 1.5f,
                    style.getFirstColor().getRGB(), 7f, .13f);

            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            renderPosY += (float) ((fontSize + padding) * f.getAnimation().getValue());
            localHeight += (float) ((fontSize + padding) * f.getAnimation().getValue());
        }
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80);
        this.height = localHeight + 2.5f;
        dragging.setWidth(this.width);
        dragging.setHeight(this.height);
    }

}

вот фулл худ, если надо, ликну
Посмотреть вложение 305845
Не похоже но серовно +- красиво +rep
 
красиво
 
дай свой тг/дс под хайд
 
красивые бинды релейка, пытался сделать чето чуть чуть похожее, вышло 50\50

Релейка
Посмотреть вложение 305844

Мое
Посмотреть вложение 305843

Code
Код:
Expand Collapse Copy
package fun.demure.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import fun.demure.Demure;
import fun.demure.events.EventDisplay;
import fun.demure.functions.api.Function;
import fun.demure.ui.display.ElementRenderer;
import fun.demure.ui.styles.Style;
import fun.demure.utils.client.KeyStorage;
import fun.demure.utils.drag.Dragging;
import fun.demure.utils.math.MathUtil;
import fun.demure.utils.math.Vector4i;
import fun.demure.utils.render.ColorUtils;
import fun.demure.utils.render.DisplayUtils;
import fun.demure.utils.render.KawaseBlur;
import fun.demure.utils.render.Scissor;
import fun.demure.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.math.vector.Vector4f;

import java.util.Locale;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class KeyBindRenderer implements ElementRenderer {

    final Dragging dragging;

    float width;
    float height;


    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        KawaseBlur.blur.updateBlur(1, 1);


        final float posX = dragging.getX();
        final float posY = dragging.getY();
        final float currentWidth = width;
        final float currentHeight = height-2.5f;

        float fontSize = 7f;
        float padding = 5;
        Style style = Demure.getInstance().getStyleManager().getCurrentStyle();
        String name = "Keybinds";

        KawaseBlur.blur.render(() -> {
            DisplayUtils.drawRoundedRect(posX-1.5f, posY-0.5f, currentWidth+2, currentHeight, 6, ColorUtils.rgba(25,25,25,120));
        });

        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(style.getFirstColor().getRGB(), 195),style.getFirstColor().getRGB(),style.getFirstColor().getRGB(),style.getFirstColor().getRGB());
        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(ColorUtils.rgb(0,0,0), 105),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0));

        DisplayUtils.drawGradientRound(posX-1.5f+1, posY-0.5f, currentWidth, currentHeight, 6,ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170));
        float fixYs = posY+16;
        DisplayUtils.drawRoundedRect(posX-1f, fixYs - 1.5f, currentWidth+1,currentHeight-14.5f,new Vector4f(0,6,0,6), ColorUtils.rgba(0,0,0,55));
        Scissor.push();
        Scissor.setFromComponentCoordinates(posX, posY-0.5f, currentWidth, currentHeight);
        Fonts.relbold.drawText(ms, name, posX+4, posY-1 +4.5f, ColorUtils.rgb(255,255,255), 7.5f, .08f);

        fun.demure.utils.font.Fonts.icons1[16].drawString(ms, "C", posX+currentWidth/1.2f, posY-1 + 7, style.getFirstColor().getRGB());

        float renderPosY = posY + fontSize + padding * 2;
        float maxWidth = Fonts.sflight.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        renderPosY += 3f;

        for (Function f : Demure.getInstance().getFunctionRegistry().getFunctions()) {

            f.getAnimation().update();
            if (!(f.getAnimation().getValue() > 0) || f.getBind() == 0) continue;
            String nameText = f.getName();
            float nameWidth = Fonts.sflight.getWidth(nameText, fontSize);

            String bindText = "[" + KeyStorage.getKey(f.getBind()) + "]";
            float bindWidth = Fonts.sflight.getWidth(bindText, fontSize);

            float localWidth = nameWidth + bindWidth + padding * 3;

            Fonts.sflight.drawText(ms, nameText, posX-1 + padding, renderPosY - 1.5f,
                    ColorUtils.rgba(255,255,255, (int) (190 * f.getAnimation().getValue())), 7f, .17f);
            Fonts.sflight.drawText(ms, bindText, posX-2 + currentWidth - padding - bindWidth+2, renderPosY - 1.5f,
                    style.getFirstColor().getRGB(), 7f, .13f);

            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            renderPosY += (float) ((fontSize + padding) * f.getAnimation().getValue());
            localHeight += (float) ((fontSize + padding) * f.getAnimation().getValue());
        }
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80);
        this.height = localHeight + 2.5f;
        dragging.setWidth(this.width);
        dragging.setHeight(this.height);
    }

}

вот фулл худ, если надо, ликну
Посмотреть вложение 305845
не юзай градиент, он плохо выглядит. юзай другие ректы похожие на ректы из релейка (у меня есть такой)
 
красивые бинды релейка, пытался сделать чето чуть чуть похожее, вышло 50\50

Релейка
Посмотреть вложение 305844

Мое
Посмотреть вложение 305843

Code
Код:
Expand Collapse Copy
package fun.demure.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import fun.demure.Demure;
import fun.demure.events.EventDisplay;
import fun.demure.functions.api.Function;
import fun.demure.ui.display.ElementRenderer;
import fun.demure.ui.styles.Style;
import fun.demure.utils.client.KeyStorage;
import fun.demure.utils.drag.Dragging;
import fun.demure.utils.math.MathUtil;
import fun.demure.utils.math.Vector4i;
import fun.demure.utils.render.ColorUtils;
import fun.demure.utils.render.DisplayUtils;
import fun.demure.utils.render.KawaseBlur;
import fun.demure.utils.render.Scissor;
import fun.demure.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.math.vector.Vector4f;

import java.util.Locale;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class KeyBindRenderer implements ElementRenderer {

    final Dragging dragging;

    float width;
    float height;


    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        KawaseBlur.blur.updateBlur(1, 1);


        final float posX = dragging.getX();
        final float posY = dragging.getY();
        final float currentWidth = width;
        final float currentHeight = height-2.5f;

        float fontSize = 7f;
        float padding = 5;
        Style style = Demure.getInstance().getStyleManager().getCurrentStyle();
        String name = "Keybinds";

        KawaseBlur.blur.render(() -> {
            DisplayUtils.drawRoundedRect(posX-1.5f, posY-0.5f, currentWidth+2, currentHeight, 6, ColorUtils.rgba(25,25,25,120));
        });

        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(style.getFirstColor().getRGB(), 195),style.getFirstColor().getRGB(),style.getFirstColor().getRGB(),style.getFirstColor().getRGB());
        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(ColorUtils.rgb(0,0,0), 105),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0));

        DisplayUtils.drawGradientRound(posX-1.5f+1, posY-0.5f, currentWidth, currentHeight, 6,ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170));
        float fixYs = posY+16;
        DisplayUtils.drawRoundedRect(posX-1f, fixYs - 1.5f, currentWidth+1,currentHeight-14.5f,new Vector4f(0,6,0,6), ColorUtils.rgba(0,0,0,55));
        Scissor.push();
        Scissor.setFromComponentCoordinates(posX, posY-0.5f, currentWidth, currentHeight);
        Fonts.relbold.drawText(ms, name, posX+4, posY-1 +4.5f, ColorUtils.rgb(255,255,255), 7.5f, .08f);

        fun.demure.utils.font.Fonts.icons1[16].drawString(ms, "C", posX+currentWidth/1.2f, posY-1 + 7, style.getFirstColor().getRGB());

        float renderPosY = posY + fontSize + padding * 2;
        float maxWidth = Fonts.sflight.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        renderPosY += 3f;

        for (Function f : Demure.getInstance().getFunctionRegistry().getFunctions()) {

            f.getAnimation().update();
            if (!(f.getAnimation().getValue() > 0) || f.getBind() == 0) continue;
            String nameText = f.getName();
            float nameWidth = Fonts.sflight.getWidth(nameText, fontSize);

            String bindText = "[" + KeyStorage.getKey(f.getBind()) + "]";
            float bindWidth = Fonts.sflight.getWidth(bindText, fontSize);

            float localWidth = nameWidth + bindWidth + padding * 3;

            Fonts.sflight.drawText(ms, nameText, posX-1 + padding, renderPosY - 1.5f,
                    ColorUtils.rgba(255,255,255, (int) (190 * f.getAnimation().getValue())), 7f, .17f);
            Fonts.sflight.drawText(ms, bindText, posX-2 + currentWidth - padding - bindWidth+2, renderPosY - 1.5f,
                    style.getFirstColor().getRGB(), 7f, .13f);

            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            renderPosY += (float) ((fontSize + padding) * f.getAnimation().getValue());
            localHeight += (float) ((fontSize + padding) * f.getAnimation().getValue());
        }
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80);
        this.height = localHeight + 2.5f;
        dragging.setWidth(this.width);
        dragging.setHeight(this.height);
    }

}

вот фулл худ, если надо, ликну
Посмотреть вложение 305845
у тебя даже лучше
 
Мо

Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.


можешь дать фулл худ + фонтики? ну или хотяб фонты хочу переделать немного твое под себя и еще утилку DisplayUtils тип DisplayUtils.drawGradientRound
 
красивые бинды релейка, пытался сделать чето чуть чуть похожее, вышло 50\50

Релейка
Посмотреть вложение 305844

Мое
Посмотреть вложение 305843

Code
Код:
Expand Collapse Copy
package fun.demure.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import fun.demure.Demure;
import fun.demure.events.EventDisplay;
import fun.demure.functions.api.Function;
import fun.demure.ui.display.ElementRenderer;
import fun.demure.ui.styles.Style;
import fun.demure.utils.client.KeyStorage;
import fun.demure.utils.drag.Dragging;
import fun.demure.utils.math.MathUtil;
import fun.demure.utils.math.Vector4i;
import fun.demure.utils.render.ColorUtils;
import fun.demure.utils.render.DisplayUtils;
import fun.demure.utils.render.KawaseBlur;
import fun.demure.utils.render.Scissor;
import fun.demure.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.math.vector.Vector4f;

import java.util.Locale;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class KeyBindRenderer implements ElementRenderer {

    final Dragging dragging;

    float width;
    float height;


    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        KawaseBlur.blur.updateBlur(1, 1);


        final float posX = dragging.getX();
        final float posY = dragging.getY();
        final float currentWidth = width;
        final float currentHeight = height-2.5f;

        float fontSize = 7f;
        float padding = 5;
        Style style = Demure.getInstance().getStyleManager().getCurrentStyle();
        String name = "Keybinds";

        KawaseBlur.blur.render(() -> {
            DisplayUtils.drawRoundedRect(posX-1.5f, posY-0.5f, currentWidth+2, currentHeight, 6, ColorUtils.rgba(25,25,25,120));
        });

        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(style.getFirstColor().getRGB(), 195),style.getFirstColor().getRGB(),style.getFirstColor().getRGB(),style.getFirstColor().getRGB());
        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(ColorUtils.rgb(0,0,0), 105),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0));

        DisplayUtils.drawGradientRound(posX-1.5f+1, posY-0.5f, currentWidth, currentHeight, 6,ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170));
        float fixYs = posY+16;
        DisplayUtils.drawRoundedRect(posX-1f, fixYs - 1.5f, currentWidth+1,currentHeight-14.5f,new Vector4f(0,6,0,6), ColorUtils.rgba(0,0,0,55));
        Scissor.push();
        Scissor.setFromComponentCoordinates(posX, posY-0.5f, currentWidth, currentHeight);
        Fonts.relbold.drawText(ms, name, posX+4, posY-1 +4.5f, ColorUtils.rgb(255,255,255), 7.5f, .08f);

        fun.demure.utils.font.Fonts.icons1[16].drawString(ms, "C", posX+currentWidth/1.2f, posY-1 + 7, style.getFirstColor().getRGB());

        float renderPosY = posY + fontSize + padding * 2;
        float maxWidth = Fonts.sflight.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        renderPosY += 3f;

        for (Function f : Demure.getInstance().getFunctionRegistry().getFunctions()) {

            f.getAnimation().update();
            if (!(f.getAnimation().getValue() > 0) || f.getBind() == 0) continue;
            String nameText = f.getName();
            float nameWidth = Fonts.sflight.getWidth(nameText, fontSize);

            String bindText = "[" + KeyStorage.getKey(f.getBind()) + "]";
            float bindWidth = Fonts.sflight.getWidth(bindText, fontSize);

            float localWidth = nameWidth + bindWidth + padding * 3;

            Fonts.sflight.drawText(ms, nameText, posX-1 + padding, renderPosY - 1.5f,
                    ColorUtils.rgba(255,255,255, (int) (190 * f.getAnimation().getValue())), 7f, .17f);
            Fonts.sflight.drawText(ms, bindText, posX-2 + currentWidth - padding - bindWidth+2, renderPosY - 1.5f,
                    style.getFirstColor().getRGB(), 7f, .13f);

            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            renderPosY += (float) ((fontSize + padding) * f.getAnimation().getValue());
            localHeight += (float) ((fontSize + padding) * f.getAnimation().getValue());
        }
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80);
        this.height = localHeight + 2.5f;
        dragging.setWidth(this.width);
        dragging.setHeight(this.height);
    }

}

вот фулл худ, если надо, ликну
Посмотреть вложение 305845
слей худик тигр наш
 
красивые бинды релейка, пытался сделать чето чуть чуть похожее, вышло 50\50

Релейка
Посмотреть вложение 305844

Мое
Посмотреть вложение 305843

Code
Код:
Expand Collapse Copy
package fun.demure.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import fun.demure.Demure;
import fun.demure.events.EventDisplay;
import fun.demure.functions.api.Function;
import fun.demure.ui.display.ElementRenderer;
import fun.demure.ui.styles.Style;
import fun.demure.utils.client.KeyStorage;
import fun.demure.utils.drag.Dragging;
import fun.demure.utils.math.MathUtil;
import fun.demure.utils.math.Vector4i;
import fun.demure.utils.render.ColorUtils;
import fun.demure.utils.render.DisplayUtils;
import fun.demure.utils.render.KawaseBlur;
import fun.demure.utils.render.Scissor;
import fun.demure.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.math.vector.Vector4f;

import java.util.Locale;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class KeyBindRenderer implements ElementRenderer {

    final Dragging dragging;

    float width;
    float height;


    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        KawaseBlur.blur.updateBlur(1, 1);


        final float posX = dragging.getX();
        final float posY = dragging.getY();
        final float currentWidth = width;
        final float currentHeight = height-2.5f;

        float fontSize = 7f;
        float padding = 5;
        Style style = Demure.getInstance().getStyleManager().getCurrentStyle();
        String name = "Keybinds";

        KawaseBlur.blur.render(() -> {
            DisplayUtils.drawRoundedRect(posX-1.5f, posY-0.5f, currentWidth+2, currentHeight, 6, ColorUtils.rgba(25,25,25,120));
        });

        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(style.getFirstColor().getRGB(), 195),style.getFirstColor().getRGB(),style.getFirstColor().getRGB(),style.getFirstColor().getRGB());
        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(ColorUtils.rgb(0,0,0), 105),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0));

        DisplayUtils.drawGradientRound(posX-1.5f+1, posY-0.5f, currentWidth, currentHeight, 6,ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170));
        float fixYs = posY+16;
        DisplayUtils.drawRoundedRect(posX-1f, fixYs - 1.5f, currentWidth+1,currentHeight-14.5f,new Vector4f(0,6,0,6), ColorUtils.rgba(0,0,0,55));
        Scissor.push();
        Scissor.setFromComponentCoordinates(posX, posY-0.5f, currentWidth, currentHeight);
        Fonts.relbold.drawText(ms, name, posX+4, posY-1 +4.5f, ColorUtils.rgb(255,255,255), 7.5f, .08f);

        fun.demure.utils.font.Fonts.icons1[16].drawString(ms, "C", posX+currentWidth/1.2f, posY-1 + 7, style.getFirstColor().getRGB());

        float renderPosY = posY + fontSize + padding * 2;
        float maxWidth = Fonts.sflight.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        renderPosY += 3f;

        for (Function f : Demure.getInstance().getFunctionRegistry().getFunctions()) {

            f.getAnimation().update();
            if (!(f.getAnimation().getValue() > 0) || f.getBind() == 0) continue;
            String nameText = f.getName();
            float nameWidth = Fonts.sflight.getWidth(nameText, fontSize);

            String bindText = "[" + KeyStorage.getKey(f.getBind()) + "]";
            float bindWidth = Fonts.sflight.getWidth(bindText, fontSize);

            float localWidth = nameWidth + bindWidth + padding * 3;

            Fonts.sflight.drawText(ms, nameText, posX-1 + padding, renderPosY - 1.5f,
                    ColorUtils.rgba(255,255,255, (int) (190 * f.getAnimation().getValue())), 7f, .17f);
            Fonts.sflight.drawText(ms, bindText, posX-2 + currentWidth - padding - bindWidth+2, renderPosY - 1.5f,
                    style.getFirstColor().getRGB(), 7f, .13f);

            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            renderPosY += (float) ((fontSize + padding) * f.getAnimation().getValue());
            localHeight += (float) ((fontSize + padding) * f.getAnimation().getValue());
        }
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80);
        this.height = localHeight + 2.5f;
        dragging.setWidth(this.width);
        dragging.setHeight(this.height);
    }

}

вот фулл худ, если надо, ликну
Посмотреть вложение 305845
ликай
 
Честно сказать хуйня скид получился, весь кривой и не похожий
 
красивые бинды релейка, пытался сделать чето чуть чуть похожее, вышло 50\50

Релейка
Посмотреть вложение 305844

Мое
Посмотреть вложение 305843

Code
Код:
Expand Collapse Copy
package fun.demure.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import fun.demure.Demure;
import fun.demure.events.EventDisplay;
import fun.demure.functions.api.Function;
import fun.demure.ui.display.ElementRenderer;
import fun.demure.ui.styles.Style;
import fun.demure.utils.client.KeyStorage;
import fun.demure.utils.drag.Dragging;
import fun.demure.utils.math.MathUtil;
import fun.demure.utils.math.Vector4i;
import fun.demure.utils.render.ColorUtils;
import fun.demure.utils.render.DisplayUtils;
import fun.demure.utils.render.KawaseBlur;
import fun.demure.utils.render.Scissor;
import fun.demure.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.math.vector.Vector4f;

import java.util.Locale;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class KeyBindRenderer implements ElementRenderer {

    final Dragging dragging;

    float width;
    float height;


    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        KawaseBlur.blur.updateBlur(1, 1);


        final float posX = dragging.getX();
        final float posY = dragging.getY();
        final float currentWidth = width;
        final float currentHeight = height-2.5f;

        float fontSize = 7f;
        float padding = 5;
        Style style = Demure.getInstance().getStyleManager().getCurrentStyle();
        String name = "Keybinds";

        KawaseBlur.blur.render(() -> {
            DisplayUtils.drawRoundedRect(posX-1.5f, posY-0.5f, currentWidth+2, currentHeight, 6, ColorUtils.rgba(25,25,25,120));
        });

        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(style.getFirstColor().getRGB(), 195),style.getFirstColor().getRGB(),style.getFirstColor().getRGB(),style.getFirstColor().getRGB());
        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(ColorUtils.rgb(0,0,0), 105),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0));

        DisplayUtils.drawGradientRound(posX-1.5f+1, posY-0.5f, currentWidth, currentHeight, 6,ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170));
        float fixYs = posY+16;
        DisplayUtils.drawRoundedRect(posX-1f, fixYs - 1.5f, currentWidth+1,currentHeight-14.5f,new Vector4f(0,6,0,6), ColorUtils.rgba(0,0,0,55));
        Scissor.push();
        Scissor.setFromComponentCoordinates(posX, posY-0.5f, currentWidth, currentHeight);
        Fonts.relbold.drawText(ms, name, posX+4, posY-1 +4.5f, ColorUtils.rgb(255,255,255), 7.5f, .08f);

        fun.demure.utils.font.Fonts.icons1[16].drawString(ms, "C", posX+currentWidth/1.2f, posY-1 + 7, style.getFirstColor().getRGB());

        float renderPosY = posY + fontSize + padding * 2;
        float maxWidth = Fonts.sflight.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        renderPosY += 3f;

        for (Function f : Demure.getInstance().getFunctionRegistry().getFunctions()) {

            f.getAnimation().update();
            if (!(f.getAnimation().getValue() > 0) || f.getBind() == 0) continue;
            String nameText = f.getName();
            float nameWidth = Fonts.sflight.getWidth(nameText, fontSize);

            String bindText = "[" + KeyStorage.getKey(f.getBind()) + "]";
            float bindWidth = Fonts.sflight.getWidth(bindText, fontSize);

            float localWidth = nameWidth + bindWidth + padding * 3;

            Fonts.sflight.drawText(ms, nameText, posX-1 + padding, renderPosY - 1.5f,
                    ColorUtils.rgba(255,255,255, (int) (190 * f.getAnimation().getValue())), 7f, .17f);
            Fonts.sflight.drawText(ms, bindText, posX-2 + currentWidth - padding - bindWidth+2, renderPosY - 1.5f,
                    style.getFirstColor().getRGB(), 7f, .13f);

            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            renderPosY += (float) ((fontSize + padding) * f.getAnimation().getValue());
            localHeight += (float) ((fontSize + padding) * f.getAnimation().getValue());
        }
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80);
        this.height = localHeight + 2.5f;
        dragging.setWidth(this.width);
        dragging.setHeight(this.height);
    }

}

вот фулл худ, если надо, ликну
Посмотреть вложение 305845
сливай фулл
 
ректы вообще разные не похоже
 
красивые бинды релейка, пытался сделать чето чуть чуть похожее, вышло 50\50

Релейка
Посмотреть вложение 305844

Мое
Посмотреть вложение 305843

Code
Код:
Expand Collapse Copy
package fun.demure.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import fun.demure.Demure;
import fun.demure.events.EventDisplay;
import fun.demure.functions.api.Function;
import fun.demure.ui.display.ElementRenderer;
import fun.demure.ui.styles.Style;
import fun.demure.utils.client.KeyStorage;
import fun.demure.utils.drag.Dragging;
import fun.demure.utils.math.MathUtil;
import fun.demure.utils.math.Vector4i;
import fun.demure.utils.render.ColorUtils;
import fun.demure.utils.render.DisplayUtils;
import fun.demure.utils.render.KawaseBlur;
import fun.demure.utils.render.Scissor;
import fun.demure.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.math.vector.Vector4f;

import java.util.Locale;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class KeyBindRenderer implements ElementRenderer {

    final Dragging dragging;

    float width;
    float height;


    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        KawaseBlur.blur.updateBlur(1, 1);


        final float posX = dragging.getX();
        final float posY = dragging.getY();
        final float currentWidth = width;
        final float currentHeight = height-2.5f;

        float fontSize = 7f;
        float padding = 5;
        Style style = Demure.getInstance().getStyleManager().getCurrentStyle();
        String name = "Keybinds";

        KawaseBlur.blur.render(() -> {
            DisplayUtils.drawRoundedRect(posX-1.5f, posY-0.5f, currentWidth+2, currentHeight, 6, ColorUtils.rgba(25,25,25,120));
        });

        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(style.getFirstColor().getRGB(), 195),style.getFirstColor().getRGB(),style.getFirstColor().getRGB(),style.getFirstColor().getRGB());
        DisplayUtils.drawGradientRound(posX-1.5f-1+1, posY-1.5f, currentWidth+2, currentHeight+2, 6.5f,ColorUtils.setAlpha(ColorUtils.rgb(0,0,0), 105),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0),ColorUtils.rgb(0,0,0));

        DisplayUtils.drawGradientRound(posX-1.5f+1, posY-0.5f, currentWidth, currentHeight, 6,ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170),ColorUtils.rgba(5,5,5,170));
        float fixYs = posY+16;
        DisplayUtils.drawRoundedRect(posX-1f, fixYs - 1.5f, currentWidth+1,currentHeight-14.5f,new Vector4f(0,6,0,6), ColorUtils.rgba(0,0,0,55));
        Scissor.push();
        Scissor.setFromComponentCoordinates(posX, posY-0.5f, currentWidth, currentHeight);
        Fonts.relbold.drawText(ms, name, posX+4, posY-1 +4.5f, ColorUtils.rgb(255,255,255), 7.5f, .08f);

        fun.demure.utils.font.Fonts.icons1[16].drawString(ms, "C", posX+currentWidth/1.2f, posY-1 + 7, style.getFirstColor().getRGB());

        float renderPosY = posY + fontSize + padding * 2;
        float maxWidth = Fonts.sflight.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        renderPosY += 3f;

        for (Function f : Demure.getInstance().getFunctionRegistry().getFunctions()) {

            f.getAnimation().update();
            if (!(f.getAnimation().getValue() > 0) || f.getBind() == 0) continue;
            String nameText = f.getName();
            float nameWidth = Fonts.sflight.getWidth(nameText, fontSize);

            String bindText = "[" + KeyStorage.getKey(f.getBind()) + "]";
            float bindWidth = Fonts.sflight.getWidth(bindText, fontSize);

            float localWidth = nameWidth + bindWidth + padding * 3;

            Fonts.sflight.drawText(ms, nameText, posX-1 + padding, renderPosY - 1.5f,
                    ColorUtils.rgba(255,255,255, (int) (190 * f.getAnimation().getValue())), 7f, .17f);
            Fonts.sflight.drawText(ms, bindText, posX-2 + currentWidth - padding - bindWidth+2, renderPosY - 1.5f,
                    style.getFirstColor().getRGB(), 7f, .13f);

            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            renderPosY += (float) ((fontSize + padding) * f.getAnimation().getValue());
            localHeight += (float) ((fontSize + padding) * f.getAnimation().getValue());
        }
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80);
        this.height = localHeight + 2.5f;
        dragging.setWidth(this.width);
        dragging.setHeight(this.height);
    }

}

вот фулл худ, если надо, ликну
Посмотреть вложение 305845
сливай фулл худ
 
Назад
Сверху Снизу