mirror of
https://github.com/xiaozhou233/OrangeX-Client.git
synced 2026-12-05 13:05:52 +08:00
Fix: GlStateManager color cache desync causing white option backgrounds
This commit is contained in:
1 parent
47f8f3e0c5
commit
2a7e12dd60
2 files changed
+4
-1
No files matched your search
+2
@@ -10,6 +10,7 @@ import cn.xiaozhou233.orangex.ui.clickgui.component.option.OptionComponent;
|
||||
import cn.xiaozhou233.orangex.ui.clickgui.component.option.OptionComponentFactory;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -51,6 +52,7 @@ public class ModuleButton extends Component {
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
if (module.isEnabled()) {
|
||||
GlStateManager.resetColor();
|
||||
Gui.drawRect(getX(), getY(), getX() + width, getY() + height, 0xff1a4a2a);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@ import cn.xiaozhou233.orangex.module.option.Option;
|
||||
import cn.xiaozhou233.orangex.ui.clickgui.Panel;
|
||||
import cn.xiaozhou233.orangex.ui.clickgui.component.Component;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
@Getter
|
||||
public abstract class OptionComponent extends Component {
|
||||
@@ -30,7 +31,7 @@ public abstract class OptionComponent extends Component {
|
||||
int bottom,
|
||||
int color
|
||||
) {
|
||||
|
||||
GlStateManager.resetColor();
|
||||
net.minecraft.client.gui.Gui.drawRect(
|
||||
left,
|
||||
top,
|
||||
|
||||
Reference in new issue
Block a user