Вопрос Подсвечивание включённых функций

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
27 Дек 2024
Сообщения
100
Реакции
0
Недавно начал учится и скачал чистую базу экспы 3.1
Добавляю скрипт захожу он всё работает но не подсвечивается когда включен
Помогите пожалуйста как сделать чтобы включеные скрипты подсвечивались могу будет скинуть какой-то код если нужно
 
Последнее редактирование:
Недавно начал учится и скачал чистую базу экспы 3.1
Добавляю скрипт захожу он всё работает но не подсвечивается когда включен
Помогите пожалуйста как сделать чтобы включеные скрипты подсвечивались могу будет скинуть какой-то код если нужно
скрины, код кидай
 
скрины, код кидай
script:
Expand Collapse Copy
package im.geassclient.functions.impl.render;

import im.geassclient.functions.api.Category;
import im.geassclient.functions.api.Function;
import im.geassclient.functions.api.FunctionRegister;

@FunctionRegister(name = "FullBright", type = Category.Render, key = -1)
public class FullBright extends Function {

    private float prevGamma = 1.0f;

    public FullBright() { super("FullBright", Category.Render); }

    [USER=1367676]@override[/USER]
    public void onEnable() {
        if (mc != null && mc.gameSettings != null) {
            prevGamma = (float) mc.gameSettings.gamma;
            if (mc.gameSettings.gamma < 15.0f) {
                mc.gameSettings.gamma = 15.0f;
            }
        }
    }

    [USER=1367676]@override[/USER]
    public void onDisable() {
        if (mc != null && mc.gameSettings != null) {
            if (prevGamma < 15.0f) {
                mc.gameSettings.gamma = prevGamma;
            }
        }
    }
}




PanelStyle:
Expand Collapse Copy
package im.geassclient.ui.dropdown;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.geassclient.functions.api.Category;
import im.geassclient.ui.styles.Style;
import im.geassclient.utils.math.MathUtil;
import im.geassclient.utils.math.Vector4i;
import im.geassclient.utils.render.*;
import im.geassclient.utils.render.font.Fonts;
import lombok.Getter;
import net.minecraft.client.Minecraft;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.glfw.GLFW;

[USER=270918]@Getter[/USER]
public class PanelStyle extends Panel {

    public PanelStyle(Category category) {
        super(category);
        // TODO Auto-generated constructor stub
    }

    float max = 0;

    [USER=1367676]@override[/USER]
    public void render(MatrixStack stack, float mouseX, float mouseY) {
        float header = 55 / 2f;
        float headerFont = 9;
        setAnimatedScrool(MathUtil.fast(getAnimatedScrool(), getScroll(), 10));

        DisplayUtils.drawRoundedRect(x, y, width, header, new Vector4f(7, 0, 7, 0), ColorUtils.rgba(23, 23, 23, (int) (255 * 0.43)));

        DisplayUtils.drawRoundedRect(x, y, width, height, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.65)));

        DisplayUtils.drawRectHorizontalW(x, y, width, header, ColorUtils.rgba(17, 17, 17, 64), ColorUtils.rgba(17, 17, 17, 0));

        DisplayUtils.drawRectVerticalW(x, y + header, width, 0.5f, ColorUtils.rgb(24, 24, 30), ColorUtils.rgb(32, 34, 40));
        Fonts.montserrat.drawCenteredText(stack, getCategory().name(), x + width / 2f, y + header / 2f - Fonts.montserrat.getHeight(headerFont) / 2f - 1, ColorUtils.rgb(161, 164, 177), headerFont, 0.1f);
        drawOutline();
        if (max > height - header - 10) {
            setScroll(MathHelper.clamp(getScroll(), -max + height - header - 10, 0));
            setAnimatedScrool(MathHelper.clamp(getAnimatedScrool(), -max + height - header - 10, 0));
        } else {
            setScroll(0);
            setAnimatedScrool(0);
        }
        float animationValue = (float) DropDown.getAnimation().getValue() * DropDown.scale;

        float halfAnimationValueRest = (1 - animationValue) / 2f;
        float height = getHeight();
        float testX = getX() + (getWidth() * halfAnimationValueRest);
        float testY = getY() + 65 / 2f + (height * halfAnimationValueRest);
        float testW = getWidth() * animationValue;
        float testH = height * animationValue;

        testX = testX * animationValue + ((Minecraft.getInstance().getMainWindow().getScaledWidth() - testW) * halfAnimationValueRest);
        Scissor.push();
        Scissor.setFromComponentCoordinates(testX, testY, testW, testH);
        int offset = 0;

        boolean hovered = false;
        for (Style style : im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList()) {
            float x = this.x + 5;
            float y = this.y + header + 5 + offset * (57 / 2f + 5) + getAnimatedScrool();
            if (MathUtil.isHovered(mouseX, mouseY, x + 5, y + 13, width - 10 - 10, 23 / 2f)) {
                hovered = true;
            }


            DisplayUtils.drawRoundedRect(x + 0.5f, y + 0.5f, width - 10 - 1, 57 / 2f - 1, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.33)));
            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(x + 0.5f, y + 0.5f, width - 10 - 1, 57 / 2f - 1, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.33)));

            Stencil.readStencilBuffer(0);

            DisplayUtils.drawRoundedRect(x, y, width - 10, 57 / 2f, new Vector4f(7, 7, 7, 7), new Vector4i(ColorUtils.rgb(48, 53, 60), ColorUtils.rgb(0, 0, 0), ColorUtils.rgb(48, 53, 60), ColorUtils.rgb(0, 0, 0)));

            Stencil.uninitStencilBuffer();

            Fonts.montserrat.drawText(stack, style.getStyleName(), x + 5, y + 5, -1, 6f, 0.05f);

            y += 1;

            if (im.geassclient.GeassClient.getInstance().getStyleManager().getCurrentStyle() == style) {
                DisplayUtils.drawShadow(x + 5, y + 13, width - 10 - 10, 23 / 2f, 12, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());
            }
            DisplayUtils.drawRoundedRect(x + 5, y + 13, width - 10 - 10, 23 / 2f, new Vector4f(7, 7, 7, 7), new Vector4i(style.getFirstColor().getRGB(), style.getFirstColor().getRGB(), style.getSecondColor().getRGB(), style.getSecondColor().getRGB()));
            offset++;
        }
        if (MathUtil.isHovered(mouseX, mouseY, x, y, width, height)) {
            if (hovered) {
                GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.HAND);
            } else {
                GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.ARROW);
            }
        }
        Scissor.unset();
        Scissor.pop();
        max = offset * im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList().size() * 2.2f;
    }

    [USER=1367676]@override[/USER]
    public void keyPressed(int key, int scanCode, int modifiers) {

    }

    [USER=1367676]@override[/USER]
    public void mouseClick(float mouseX, float mouseY, int button) {
        float header = 55 / 2f;
        int offset = 0;
        for (Style style : im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList()) {
            float x = this.x + 5;
            float y = this.y + header + 5 + offset * (57 / 2f + 5) + getAnimatedScrool();
            if (MathUtil.isHovered(mouseX, mouseY, x + 5, y + 13, width - 10 - 10, 23 / 2f)) {
                im.geassclient.GeassClient.getInstance().getStyleManager().setCurrentStyle(style);
            }
            offset++;
        }

    }

    [USER=1367676]@override[/USER]
    public void mouseRelease(float mouseX, float mouseY, int button) {

    }

}
Пожалуйста, авторизуйтесь для просмотра ссылки.


Если не тот код скинул скажи я нужный скину
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
script:
Expand Collapse Copy
package im.geassclient.functions.impl.render;

import im.geassclient.functions.api.Category;
import im.geassclient.functions.api.Function;
import im.geassclient.functions.api.FunctionRegister;

@FunctionRegister(name = "FullBright", type = Category.Render, key = -1)
public class FullBright extends Function {

    private float prevGamma = 1.0f;

    public FullBright() { super("FullBright", Category.Render); }

    [USER=1367676]@override[/USER]
    public void onEnable() {
        if (mc != null && mc.gameSettings != null) {
            prevGamma = (float) mc.gameSettings.gamma;
            if (mc.gameSettings.gamma < 15.0f) {
                mc.gameSettings.gamma = 15.0f;
            }
        }
    }

    [USER=1367676]@override[/USER]
    public void onDisable() {
        if (mc != null && mc.gameSettings != null) {
            if (prevGamma < 15.0f) {
                mc.gameSettings.gamma = prevGamma;
            }
        }
    }
}




PanelStyle:
Expand Collapse Copy
package im.geassclient.ui.dropdown;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.geassclient.functions.api.Category;
import im.geassclient.ui.styles.Style;
import im.geassclient.utils.math.MathUtil;
import im.geassclient.utils.math.Vector4i;
import im.geassclient.utils.render.*;
import im.geassclient.utils.render.font.Fonts;
import lombok.Getter;
import net.minecraft.client.Minecraft;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.glfw.GLFW;

[USER=270918]@Getter[/USER]
public class PanelStyle extends Panel {

    public PanelStyle(Category category) {
        super(category);
        // TODO Auto-generated constructor stub
    }

    float max = 0;

    [USER=1367676]@override[/USER]
    public void render(MatrixStack stack, float mouseX, float mouseY) {
        float header = 55 / 2f;
        float headerFont = 9;
        setAnimatedScrool(MathUtil.fast(getAnimatedScrool(), getScroll(), 10));

        DisplayUtils.drawRoundedRect(x, y, width, header, new Vector4f(7, 0, 7, 0), ColorUtils.rgba(23, 23, 23, (int) (255 * 0.43)));

        DisplayUtils.drawRoundedRect(x, y, width, height, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.65)));

        DisplayUtils.drawRectHorizontalW(x, y, width, header, ColorUtils.rgba(17, 17, 17, 64), ColorUtils.rgba(17, 17, 17, 0));

        DisplayUtils.drawRectVerticalW(x, y + header, width, 0.5f, ColorUtils.rgb(24, 24, 30), ColorUtils.rgb(32, 34, 40));
        Fonts.montserrat.drawCenteredText(stack, getCategory().name(), x + width / 2f, y + header / 2f - Fonts.montserrat.getHeight(headerFont) / 2f - 1, ColorUtils.rgb(161, 164, 177), headerFont, 0.1f);
        drawOutline();
        if (max > height - header - 10) {
            setScroll(MathHelper.clamp(getScroll(), -max + height - header - 10, 0));
            setAnimatedScrool(MathHelper.clamp(getAnimatedScrool(), -max + height - header - 10, 0));
        } else {
            setScroll(0);
            setAnimatedScrool(0);
        }
        float animationValue = (float) DropDown.getAnimation().getValue() * DropDown.scale;

        float halfAnimationValueRest = (1 - animationValue) / 2f;
        float height = getHeight();
        float testX = getX() + (getWidth() * halfAnimationValueRest);
        float testY = getY() + 65 / 2f + (height * halfAnimationValueRest);
        float testW = getWidth() * animationValue;
        float testH = height * animationValue;

        testX = testX * animationValue + ((Minecraft.getInstance().getMainWindow().getScaledWidth() - testW) * halfAnimationValueRest);
        Scissor.push();
        Scissor.setFromComponentCoordinates(testX, testY, testW, testH);
        int offset = 0;

        boolean hovered = false;
        for (Style style : im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList()) {
            float x = this.x + 5;
            float y = this.y + header + 5 + offset * (57 / 2f + 5) + getAnimatedScrool();
            if (MathUtil.isHovered(mouseX, mouseY, x + 5, y + 13, width - 10 - 10, 23 / 2f)) {
                hovered = true;
            }


            DisplayUtils.drawRoundedRect(x + 0.5f, y + 0.5f, width - 10 - 1, 57 / 2f - 1, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.33)));
            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(x + 0.5f, y + 0.5f, width - 10 - 1, 57 / 2f - 1, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.33)));

            Stencil.readStencilBuffer(0);

            DisplayUtils.drawRoundedRect(x, y, width - 10, 57 / 2f, new Vector4f(7, 7, 7, 7), new Vector4i(ColorUtils.rgb(48, 53, 60), ColorUtils.rgb(0, 0, 0), ColorUtils.rgb(48, 53, 60), ColorUtils.rgb(0, 0, 0)));

            Stencil.uninitStencilBuffer();

            Fonts.montserrat.drawText(stack, style.getStyleName(), x + 5, y + 5, -1, 6f, 0.05f);

            y += 1;

            if (im.geassclient.GeassClient.getInstance().getStyleManager().getCurrentStyle() == style) {
                DisplayUtils.drawShadow(x + 5, y + 13, width - 10 - 10, 23 / 2f, 12, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());
            }
            DisplayUtils.drawRoundedRect(x + 5, y + 13, width - 10 - 10, 23 / 2f, new Vector4f(7, 7, 7, 7), new Vector4i(style.getFirstColor().getRGB(), style.getFirstColor().getRGB(), style.getSecondColor().getRGB(), style.getSecondColor().getRGB()));
            offset++;
        }
        if (MathUtil.isHovered(mouseX, mouseY, x, y, width, height)) {
            if (hovered) {
                GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.HAND);
            } else {
                GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.ARROW);
            }
        }
        Scissor.unset();
        Scissor.pop();
        max = offset * im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList().size() * 2.2f;
    }

    [USER=1367676]@override[/USER]
    public void keyPressed(int key, int scanCode, int modifiers) {

    }

    [USER=1367676]@override[/USER]
    public void mouseClick(float mouseX, float mouseY, int button) {
        float header = 55 / 2f;
        int offset = 0;
        for (Style style : im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList()) {
            float x = this.x + 5;
            float y = this.y + header + 5 + offset * (57 / 2f + 5) + getAnimatedScrool();
            if (MathUtil.isHovered(mouseX, mouseY, x + 5, y + 13, width - 10 - 10, 23 / 2f)) {
                im.geassclient.GeassClient.getInstance().getStyleManager().setCurrentStyle(style);
            }
            offset++;
        }

    }

    [USER=1367676]@override[/USER]
    public void mouseRelease(float mouseX, float mouseY, int button) {

    }

}
Пожалуйста, авторизуйтесь для просмотра ссылки.


Если не тот код скинул скажи я нужный скину
В джаве нету скриптов в отличии от роблокс студио || луа иииии ну пон да это называется класс
Кстати отгадай что значит ||
script:
Expand Collapse Copy
package im.geassclient.functions.impl.render;

import im.geassclient.functions.api.Category;
import im.geassclient.functions.api.Function;
import im.geassclient.functions.api.FunctionRegister;

@FunctionRegister(name = "FullBright", type = Category.Render, key = -1)
public class FullBright extends Function {

    private float prevGamma = 1.0f;

    public FullBright() { super("FullBright", Category.Render); }

    [USER=1367676]@override[/USER]
    public void onEnable() {
        if (mc != null && mc.gameSettings != null) {
            prevGamma = (float) mc.gameSettings.gamma;
            if (mc.gameSettings.gamma < 15.0f) {
                mc.gameSettings.gamma = 15.0f;
            }
        }
    }

    [USER=1367676]@override[/USER]
    public void onDisable() {
        if (mc != null && mc.gameSettings != null) {
            if (prevGamma < 15.0f) {
                mc.gameSettings.gamma = prevGamma;
            }
        }
    }
}




PanelStyle:
Expand Collapse Copy
package im.geassclient.ui.dropdown;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.geassclient.functions.api.Category;
import im.geassclient.ui.styles.Style;
import im.geassclient.utils.math.MathUtil;
import im.geassclient.utils.math.Vector4i;
import im.geassclient.utils.render.*;
import im.geassclient.utils.render.font.Fonts;
import lombok.Getter;
import net.minecraft.client.Minecraft;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.glfw.GLFW;

[USER=270918]@Getter[/USER]
public class PanelStyle extends Panel {

    public PanelStyle(Category category) {
        super(category);
        // TODO Auto-generated constructor stub
    }

    float max = 0;

    [USER=1367676]@override[/USER]
    public void render(MatrixStack stack, float mouseX, float mouseY) {
        float header = 55 / 2f;
        float headerFont = 9;
        setAnimatedScrool(MathUtil.fast(getAnimatedScrool(), getScroll(), 10));

        DisplayUtils.drawRoundedRect(x, y, width, header, new Vector4f(7, 0, 7, 0), ColorUtils.rgba(23, 23, 23, (int) (255 * 0.43)));

        DisplayUtils.drawRoundedRect(x, y, width, height, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.65)));

        DisplayUtils.drawRectHorizontalW(x, y, width, header, ColorUtils.rgba(17, 17, 17, 64), ColorUtils.rgba(17, 17, 17, 0));

        DisplayUtils.drawRectVerticalW(x, y + header, width, 0.5f, ColorUtils.rgb(24, 24, 30), ColorUtils.rgb(32, 34, 40));
        Fonts.montserrat.drawCenteredText(stack, getCategory().name(), x + width / 2f, y + header / 2f - Fonts.montserrat.getHeight(headerFont) / 2f - 1, ColorUtils.rgb(161, 164, 177), headerFont, 0.1f);
        drawOutline();
        if (max > height - header - 10) {
            setScroll(MathHelper.clamp(getScroll(), -max + height - header - 10, 0));
            setAnimatedScrool(MathHelper.clamp(getAnimatedScrool(), -max + height - header - 10, 0));
        } else {
            setScroll(0);
            setAnimatedScrool(0);
        }
        float animationValue = (float) DropDown.getAnimation().getValue() * DropDown.scale;

        float halfAnimationValueRest = (1 - animationValue) / 2f;
        float height = getHeight();
        float testX = getX() + (getWidth() * halfAnimationValueRest);
        float testY = getY() + 65 / 2f + (height * halfAnimationValueRest);
        float testW = getWidth() * animationValue;
        float testH = height * animationValue;

        testX = testX * animationValue + ((Minecraft.getInstance().getMainWindow().getScaledWidth() - testW) * halfAnimationValueRest);
        Scissor.push();
        Scissor.setFromComponentCoordinates(testX, testY, testW, testH);
        int offset = 0;

        boolean hovered = false;
        for (Style style : im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList()) {
            float x = this.x + 5;
            float y = this.y + header + 5 + offset * (57 / 2f + 5) + getAnimatedScrool();
            if (MathUtil.isHovered(mouseX, mouseY, x + 5, y + 13, width - 10 - 10, 23 / 2f)) {
                hovered = true;
            }


            DisplayUtils.drawRoundedRect(x + 0.5f, y + 0.5f, width - 10 - 1, 57 / 2f - 1, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.33)));
            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(x + 0.5f, y + 0.5f, width - 10 - 1, 57 / 2f - 1, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.33)));

            Stencil.readStencilBuffer(0);

            DisplayUtils.drawRoundedRect(x, y, width - 10, 57 / 2f, new Vector4f(7, 7, 7, 7), new Vector4i(ColorUtils.rgb(48, 53, 60), ColorUtils.rgb(0, 0, 0), ColorUtils.rgb(48, 53, 60), ColorUtils.rgb(0, 0, 0)));

            Stencil.uninitStencilBuffer();

            Fonts.montserrat.drawText(stack, style.getStyleName(), x + 5, y + 5, -1, 6f, 0.05f);

            y += 1;

            if (im.geassclient.GeassClient.getInstance().getStyleManager().getCurrentStyle() == style) {
                DisplayUtils.drawShadow(x + 5, y + 13, width - 10 - 10, 23 / 2f, 12, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());
            }
            DisplayUtils.drawRoundedRect(x + 5, y + 13, width - 10 - 10, 23 / 2f, new Vector4f(7, 7, 7, 7), new Vector4i(style.getFirstColor().getRGB(), style.getFirstColor().getRGB(), style.getSecondColor().getRGB(), style.getSecondColor().getRGB()));
            offset++;
        }
        if (MathUtil.isHovered(mouseX, mouseY, x, y, width, height)) {
            if (hovered) {
                GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.HAND);
            } else {
                GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.ARROW);
            }
        }
        Scissor.unset();
        Scissor.pop();
        max = offset * im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList().size() * 2.2f;
    }

    [USER=1367676]@override[/USER]
    public void keyPressed(int key, int scanCode, int modifiers) {

    }

    [USER=1367676]@override[/USER]
    public void mouseClick(float mouseX, float mouseY, int button) {
        float header = 55 / 2f;
        int offset = 0;
        for (Style style : im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList()) {
            float x = this.x + 5;
            float y = this.y + header + 5 + offset * (57 / 2f + 5) + getAnimatedScrool();
            if (MathUtil.isHovered(mouseX, mouseY, x + 5, y + 13, width - 10 - 10, 23 / 2f)) {
                im.geassclient.GeassClient.getInstance().getStyleManager().setCurrentStyle(style);
            }
            offset++;
        }

    }

    [USER=1367676]@override[/USER]
    public void mouseRelease(float mouseX, float mouseY, int button) {

    }

}
Пожалуйста, авторизуйтесь для просмотра ссылки.


Если не тот код скинул скажи я нужный скину
Это делается в ModuleComponent ну поищи похожее чето в папке с гуишкой и там в конце drawText и там сделай if (funtion.isState()) { textColor = -1 } else {textColor = new Color(220,220,220}
script:
Expand Collapse Copy
package im.geassclient.functions.impl.render;

import im.geassclient.functions.api.Category;
import im.geassclient.functions.api.Function;
import im.geassclient.functions.api.FunctionRegister;

@FunctionRegister(name = "FullBright", type = Category.Render, key = -1)
public class FullBright extends Function {

    private float prevGamma = 1.0f;

    public FullBright() { super("FullBright", Category.Render); }

    [USER=1367676]@override[/USER]
    public void onEnable() {
        if (mc != null && mc.gameSettings != null) {
            prevGamma = (float) mc.gameSettings.gamma;
            if (mc.gameSettings.gamma < 15.0f) {
                mc.gameSettings.gamma = 15.0f;
            }
        }
    }

    [USER=1367676]@override[/USER]
    public void onDisable() {
        if (mc != null && mc.gameSettings != null) {
            if (prevGamma < 15.0f) {
                mc.gameSettings.gamma = prevGamma;
            }
        }
    }
}




PanelStyle:
Expand Collapse Copy
package im.geassclient.ui.dropdown;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.geassclient.functions.api.Category;
import im.geassclient.ui.styles.Style;
import im.geassclient.utils.math.MathUtil;
import im.geassclient.utils.math.Vector4i;
import im.geassclient.utils.render.*;
import im.geassclient.utils.render.font.Fonts;
import lombok.Getter;
import net.minecraft.client.Minecraft;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.glfw.GLFW;

[USER=270918]@Getter[/USER]
public class PanelStyle extends Panel {

    public PanelStyle(Category category) {
        super(category);
        // TODO Auto-generated constructor stub
    }

    float max = 0;

    [USER=1367676]@override[/USER]
    public void render(MatrixStack stack, float mouseX, float mouseY) {
        float header = 55 / 2f;
        float headerFont = 9;
        setAnimatedScrool(MathUtil.fast(getAnimatedScrool(), getScroll(), 10));

        DisplayUtils.drawRoundedRect(x, y, width, header, new Vector4f(7, 0, 7, 0), ColorUtils.rgba(23, 23, 23, (int) (255 * 0.43)));

        DisplayUtils.drawRoundedRect(x, y, width, height, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.65)));

        DisplayUtils.drawRectHorizontalW(x, y, width, header, ColorUtils.rgba(17, 17, 17, 64), ColorUtils.rgba(17, 17, 17, 0));

        DisplayUtils.drawRectVerticalW(x, y + header, width, 0.5f, ColorUtils.rgb(24, 24, 30), ColorUtils.rgb(32, 34, 40));
        Fonts.montserrat.drawCenteredText(stack, getCategory().name(), x + width / 2f, y + header / 2f - Fonts.montserrat.getHeight(headerFont) / 2f - 1, ColorUtils.rgb(161, 164, 177), headerFont, 0.1f);
        drawOutline();
        if (max > height - header - 10) {
            setScroll(MathHelper.clamp(getScroll(), -max + height - header - 10, 0));
            setAnimatedScrool(MathHelper.clamp(getAnimatedScrool(), -max + height - header - 10, 0));
        } else {
            setScroll(0);
            setAnimatedScrool(0);
        }
        float animationValue = (float) DropDown.getAnimation().getValue() * DropDown.scale;

        float halfAnimationValueRest = (1 - animationValue) / 2f;
        float height = getHeight();
        float testX = getX() + (getWidth() * halfAnimationValueRest);
        float testY = getY() + 65 / 2f + (height * halfAnimationValueRest);
        float testW = getWidth() * animationValue;
        float testH = height * animationValue;

        testX = testX * animationValue + ((Minecraft.getInstance().getMainWindow().getScaledWidth() - testW) * halfAnimationValueRest);
        Scissor.push();
        Scissor.setFromComponentCoordinates(testX, testY, testW, testH);
        int offset = 0;

        boolean hovered = false;
        for (Style style : im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList()) {
            float x = this.x + 5;
            float y = this.y + header + 5 + offset * (57 / 2f + 5) + getAnimatedScrool();
            if (MathUtil.isHovered(mouseX, mouseY, x + 5, y + 13, width - 10 - 10, 23 / 2f)) {
                hovered = true;
            }


            DisplayUtils.drawRoundedRect(x + 0.5f, y + 0.5f, width - 10 - 1, 57 / 2f - 1, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.33)));
            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(x + 0.5f, y + 0.5f, width - 10 - 1, 57 / 2f - 1, new Vector4f(7, 7, 7, 7), ColorUtils.rgba(17, 17, 17, (int) (255 * 0.33)));

            Stencil.readStencilBuffer(0);

            DisplayUtils.drawRoundedRect(x, y, width - 10, 57 / 2f, new Vector4f(7, 7, 7, 7), new Vector4i(ColorUtils.rgb(48, 53, 60), ColorUtils.rgb(0, 0, 0), ColorUtils.rgb(48, 53, 60), ColorUtils.rgb(0, 0, 0)));

            Stencil.uninitStencilBuffer();

            Fonts.montserrat.drawText(stack, style.getStyleName(), x + 5, y + 5, -1, 6f, 0.05f);

            y += 1;

            if (im.geassclient.GeassClient.getInstance().getStyleManager().getCurrentStyle() == style) {
                DisplayUtils.drawShadow(x + 5, y + 13, width - 10 - 10, 23 / 2f, 12, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());
            }
            DisplayUtils.drawRoundedRect(x + 5, y + 13, width - 10 - 10, 23 / 2f, new Vector4f(7, 7, 7, 7), new Vector4i(style.getFirstColor().getRGB(), style.getFirstColor().getRGB(), style.getSecondColor().getRGB(), style.getSecondColor().getRGB()));
            offset++;
        }
        if (MathUtil.isHovered(mouseX, mouseY, x, y, width, height)) {
            if (hovered) {
                GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.HAND);
            } else {
                GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.ARROW);
            }
        }
        Scissor.unset();
        Scissor.pop();
        max = offset * im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList().size() * 2.2f;
    }

    [USER=1367676]@override[/USER]
    public void keyPressed(int key, int scanCode, int modifiers) {

    }

    [USER=1367676]@override[/USER]
    public void mouseClick(float mouseX, float mouseY, int button) {
        float header = 55 / 2f;
        int offset = 0;
        for (Style style : im.geassclient.GeassClient.getInstance().getStyleManager().getStyleList()) {
            float x = this.x + 5;
            float y = this.y + header + 5 + offset * (57 / 2f + 5) + getAnimatedScrool();
            if (MathUtil.isHovered(mouseX, mouseY, x + 5, y + 13, width - 10 - 10, 23 / 2f)) {
                im.geassclient.GeassClient.getInstance().getStyleManager().setCurrentStyle(style);
            }
            offset++;
        }

    }

    [USER=1367676]@override[/USER]
    public void mouseRelease(float mouseX, float mouseY, int button) {

    }

}
Пожалуйста, авторизуйтесь для просмотра ссылки.


Если не тот код скинул скажи я нужный скину
Кстати если ты фуллбрайт делаешь то ставь super.onEnable() и super.onDisable() я думаю сам найдешь где
 
Это делается в ModuleComponent ну поищи похожее чето в папке с гуишкой и там в конце drawText и там сделай if (funtion.isState()) { textColor = -1 } else {textColor = new Color(220,220,220}
Сорян если что-то не так делаю nbn.png
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
единственное верное решение
Ольо йа што знал кде ашибка!!!!! Зочэм попкорн сразу кидат??????
Ну там чел написал что правильно а так я $$$$$$elfcoder и я с телефона написал тебе код???????
 
Последнее редактирование:
Назад
Сверху Снизу