• Я зарабатываю 100 000 RUB / месяц на этом сайте!

    А знаешь как? Я всего-лишь публикую (создаю темы), а админ мне платит. Трачу деньги на мороженое, робуксы и сервера в Minecraft. А ещё на паль из Китая. 

    Хочешь так же? Пиши и узнавай условия: https://t.me/alex_redact
    Реклама: https://t.me/yougame_official

Визуальная часть Widget/Кнопочки | Exp 3.1 Ready

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
23 Сен 2024
Сообщения
254
Реакции
0
Выберите загрузчик игры
  1. Прочие моды
Всем привет, нормальных кнопок на Югейме не нашёл, поэтому сливаю свои
Данные кнопки при наводке на них меняют свой цвет
SS:
1746188098511.png

Для того чтобы запастить нужно в классе Widget.java найти мтеод renderButton
DW:

Widget.java:
Expand Collapse Copy
private float btnDarkness = 0.4F;
    private float hoverProgress = 0f;
    private final float animationSpeed = 0.15f;
    public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        Minecraft minecraft = Minecraft.getInstance();
        btnDarkness = (float) MathHelper.lerp(btnDarkness, this.isHovered ? 0.75F : 0.25F, 10);
        int color = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.rgb(255, 255, 255) : ColorUtils.rgba(222, 222, 222, (int) (255));
        float darkness = this.active ? btnDarkness : 0.2F;
        int color1 = ColorUtils.getColor(color);
        int color2 = ColorUtils.getColor(color);
        int color3 = ColorUtils.getColor(color);
        int color4 = ColorUtils.getColor(color);
        boolean isHovered = MathUtil.isHovered(mouseX, mouseY, (int) (x), y, width, height);
        int megaradiun = (int) 6f;
        if (isHovered) {
            hoverProgress = Math.min(hoverProgress + animationSpeed, 1f);
        } else {
            hoverProgress = Math.max(hoverProgress - animationSpeed, 0f);
        }
        int colorrect1 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect2 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect3 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect4 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(87, 90, 181, (int) (0));

        DisplayUtils.drawRoundedRect(x - 2.5f, y + 2 - 2.5f, width, height ,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),ColorUtils.rgba(15, 15, 15, 210));
        DisplayUtils.drawRoundedRect(x - 2.5f - 0.5f, y + 2 - 2.5f - 0.5f, width + 1, height + 1,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),new Vector4i(
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect1, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect2, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect3, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect4, 50), hoverProgress)
        ));

        Fonts.otwindowsa.drawCenteredText(matrixStack, getMessage().getString(), x - 2 + width / 2, y - 3 + height / 2f - 2f - 0.5f, color, 9f);
    }
 
/del криво + 2 темы было со сливом
 
Всем привет, нормальных кнопок на Югейме не нашёл, поэтому сливаю свои
Данные кнопки при наводке на них меняют свой цвет
SS:
Посмотреть вложение 305238
Для того чтобы запастить нужно в классе Widget.java найти мтеод renderButton
DW:

Widget.java:
Expand Collapse Copy
private float btnDarkness = 0.4F;
    private float hoverProgress = 0f;
    private final float animationSpeed = 0.15f;
    public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        Minecraft minecraft = Minecraft.getInstance();
        btnDarkness = (float) MathHelper.lerp(btnDarkness, this.isHovered ? 0.75F : 0.25F, 10);
        int color = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.rgb(255, 255, 255) : ColorUtils.rgba(222, 222, 222, (int) (255));
        float darkness = this.active ? btnDarkness : 0.2F;
        int color1 = ColorUtils.getColor(color);
        int color2 = ColorUtils.getColor(color);
        int color3 = ColorUtils.getColor(color);
        int color4 = ColorUtils.getColor(color);
        boolean isHovered = MathUtil.isHovered(mouseX, mouseY, (int) (x), y, width, height);
        int megaradiun = (int) 6f;
        if (isHovered) {
            hoverProgress = Math.min(hoverProgress + animationSpeed, 1f);
        } else {
            hoverProgress = Math.max(hoverProgress - animationSpeed, 0f);
        }
        int colorrect1 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect2 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect3 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect4 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(87, 90, 181, (int) (0));

        DisplayUtils.drawRoundedRect(x - 2.5f, y + 2 - 2.5f, width, height ,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),ColorUtils.rgba(15, 15, 15, 210));
        DisplayUtils.drawRoundedRect(x - 2.5f - 0.5f, y + 2 - 2.5f - 0.5f, width + 1, height + 1,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),new Vector4i(
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect1, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect2, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect3, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect4, 50), hoverProgress)
        ));

        Fonts.otwindowsa.drawCenteredText(matrixStack, getMessage().getString(), x - 2 + width / 2, y - 3 + height / 2f - 2f - 0.5f, color, 9f);
    }
/del сливали уже 5 раз просто юг полистай гений
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
а че пастеры даже такое сделать не могут
Всем привет, нормальных кнопок на Югейме не нашёл, поэтому сливаю свои
Данные кнопки при наводке на них меняют свой цвет
SS:
Посмотреть вложение 305238
Для того чтобы запастить нужно в классе Widget.java найти мтеод renderButton
DW:

Widget.java:
Expand Collapse Copy
private float btnDarkness = 0.4F;
    private float hoverProgress = 0f;
    private final float animationSpeed = 0.15f;
    public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        Minecraft minecraft = Minecraft.getInstance();
        btnDarkness = (float) MathHelper.lerp(btnDarkness, this.isHovered ? 0.75F : 0.25F, 10);
        int color = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.rgb(255, 255, 255) : ColorUtils.rgba(222, 222, 222, (int) (255));
        float darkness = this.active ? btnDarkness : 0.2F;
        int color1 = ColorUtils.getColor(color);
        int color2 = ColorUtils.getColor(color);
        int color3 = ColorUtils.getColor(color);
        int color4 = ColorUtils.getColor(color);
        boolean isHovered = MathUtil.isHovered(mouseX, mouseY, (int) (x), y, width, height);
        int megaradiun = (int) 6f;
        if (isHovered) {
            hoverProgress = Math.min(hoverProgress + animationSpeed, 1f);
        } else {
            hoverProgress = Math.max(hoverProgress - animationSpeed, 0f);
        }
        int colorrect1 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect2 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect3 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect4 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(87, 90, 181, (int) (0));

        DisplayUtils.drawRoundedRect(x - 2.5f, y + 2 - 2.5f, width, height ,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),ColorUtils.rgba(15, 15, 15, 210));
        DisplayUtils.drawRoundedRect(x - 2.5f - 0.5f, y + 2 - 2.5f - 0.5f, width + 1, height + 1,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),new Vector4i(
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect1, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect2, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect3, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect4, 50), hoverProgress)
        ));

        Fonts.otwindowsa.drawCenteredText(matrixStack, getMessage().getString(), x - 2 + width / 2, y - 3 + height / 2f - 2f - 0.5f, color, 9f);
    }
лучше килку слей
 
Всем привет, нормальных кнопок на Югейме не нашёл, поэтому сливаю свои
Данные кнопки при наводке на них меняют свой цвет
SS:
Посмотреть вложение 305238
Для того чтобы запастить нужно в классе Widget.java найти мтеод renderButton
DW:

Widget.java:
Expand Collapse Copy
private float btnDarkness = 0.4F;
    private float hoverProgress = 0f;
    private final float animationSpeed = 0.15f;
    public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        Minecraft minecraft = Minecraft.getInstance();
        btnDarkness = (float) MathHelper.lerp(btnDarkness, this.isHovered ? 0.75F : 0.25F, 10);
        int color = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.rgb(255, 255, 255) : ColorUtils.rgba(222, 222, 222, (int) (255));
        float darkness = this.active ? btnDarkness : 0.2F;
        int color1 = ColorUtils.getColor(color);
        int color2 = ColorUtils.getColor(color);
        int color3 = ColorUtils.getColor(color);
        int color4 = ColorUtils.getColor(color);
        boolean isHovered = MathUtil.isHovered(mouseX, mouseY, (int) (x), y, width, height);
        int megaradiun = (int) 6f;
        if (isHovered) {
            hoverProgress = Math.min(hoverProgress + animationSpeed, 1f);
        } else {
            hoverProgress = Math.max(hoverProgress - animationSpeed, 0f);
        }
        int colorrect1 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect2 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect3 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect4 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(87, 90, 181, (int) (0));

        DisplayUtils.drawRoundedRect(x - 2.5f, y + 2 - 2.5f, width, height ,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),ColorUtils.rgba(15, 15, 15, 210));
        DisplayUtils.drawRoundedRect(x - 2.5f - 0.5f, y + 2 - 2.5f - 0.5f, width + 1, height + 1,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),new Vector4i(
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect1, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect2, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect3, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect4, 50), hoverProgress)
        ));

        Fonts.otwindowsa.drawCenteredText(matrixStack, getMessage().getString(), x - 2 + width / 2, y - 3 + height / 2f - 2f - 0.5f, color, 9f);
    }
рокстар?
 
Всем привет, нормальных кнопок на Югейме не нашёл, поэтому сливаю свои
Данные кнопки при наводке на них меняют свой цвет
SS:
Посмотреть вложение 305238
Для того чтобы запастить нужно в классе Widget.java найти мтеод renderButton
DW:

Widget.java:
Expand Collapse Copy
private float btnDarkness = 0.4F;
    private float hoverProgress = 0f;
    private final float animationSpeed = 0.15f;
    public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        Minecraft minecraft = Minecraft.getInstance();
        btnDarkness = (float) MathHelper.lerp(btnDarkness, this.isHovered ? 0.75F : 0.25F, 10);
        int color = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.rgb(255, 255, 255) : ColorUtils.rgba(222, 222, 222, (int) (255));
        float darkness = this.active ? btnDarkness : 0.2F;
        int color1 = ColorUtils.getColor(color);
        int color2 = ColorUtils.getColor(color);
        int color3 = ColorUtils.getColor(color);
        int color4 = ColorUtils.getColor(color);
        boolean isHovered = MathUtil.isHovered(mouseX, mouseY, (int) (x), y, width, height);
        int megaradiun = (int) 6f;
        if (isHovered) {
            hoverProgress = Math.min(hoverProgress + animationSpeed, 1f);
        } else {
            hoverProgress = Math.max(hoverProgress - animationSpeed, 0f);
        }
        int colorrect1 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect2 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect3 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(255, 90, 181, (int) (0));
        int colorrect4 = MathUtil.isHovered(mouseX, mouseY, x, y, width, height) ? ColorUtils.setAlpha(Theme.getColor(0), 165) : ColorUtils.rgba(87, 90, 181, (int) (0));

        DisplayUtils.drawRoundedRect(x - 2.5f, y + 2 - 2.5f, width, height ,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),ColorUtils.rgba(15, 15, 15, 210));
        DisplayUtils.drawRoundedRect(x - 2.5f - 0.5f, y + 2 - 2.5f - 0.5f, width + 1, height + 1,new Vector4f(megaradiun,megaradiun,megaradiun,megaradiun),new Vector4i(
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect1, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect2, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect3, 50), hoverProgress),
                ColorUtils.interpolateColor(new Color(87, 90, 181, 0).getRGB(), ColorUtils.setAlpha(colorrect4, 50), hoverProgress)
        ));

        Fonts.otwindowsa.drawCenteredText(matrixStack, getMessage().getString(), x - 2 + width / 2, y - 3 + height / 2f - 2f - 0.5f, color, 9f);
    }
красиво но в данке лучше спаста
 

Похожие темы

Назад
Сверху Снизу