Skip to content

Commit

Permalink
Added warning in config screen
Browse files Browse the repository at this point in the history
  • Loading branch information
r8420 committed Aug 19, 2021
1 parent b888dad commit d30f756
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/main/java/at/ridgo8/moreoverlays/gui/ConfigScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import at.ridgo8.moreoverlays.MoreOverlays;
import at.ridgo8.moreoverlays.gui.config.ConfigOptionList;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.screens.Screen;
Expand Down Expand Up @@ -32,7 +33,8 @@ public class ConfigScreen extends Screen {
private String txtDone = "";

public ConfigScreen(Screen modListScreen, ForgeConfigSpec spec, String modId) {
super(new TranslatableComponent("gui.config." + modId + ".tile"));
//super(new TranslatableComponent("gui.config." + modId + ".tile"));
super(new TranslatableComponent("Config screen broken in this version - Edit config/moreoverlays.toml Manually!").withStyle(ChatFormatting.DARK_RED));
this.modListScreen = modListScreen;
this.configSpec = spec;
this.modId = modId;
Expand Down Expand Up @@ -84,7 +86,7 @@ protected void init() {
Component.nullToEmpty(" " + this.txtDone),
(btn) -> this.back());

this.addWidget(this.optionList);
// this.addWidget(this.optionList);
this.addWidget(this.btnReset);
this.addWidget(this.btnUndo);
this.addWidget(this.btnBack);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.mojang.blaze3d.platform.Lighting;
import net.minecraft.client.resources.language.I18n;
import net.minecraftforge.common.ForgeConfigSpec;
import org.lwjgl.opengl.GL11;

import java.lang.reflect.Field;
import java.util.*;
Expand Down Expand Up @@ -294,10 +293,10 @@ public void render(PoseStack matrixStack, int itemindex, int rowTop, int rowLeft

mouseX -= rowLeft;
mouseY -= rowTop;
GL11.glTranslatef(rowLeft, rowTop, 0);
matrixStack.translate(rowLeft, rowTop, 0);
renderControls(matrixStack, rowTop, rowLeft, rowWidth, itemHeight, mouseX, mouseY, mouseOver, partialTick);

GL11.glTranslatef(-rowLeft, -rowTop, 0);
matrixStack.translate(-rowLeft, -rowTop, 0);
}

protected abstract void renderControls(PoseStack matrixStack, int rowTop, int rowLeft, int rowWidth, int itemHeight, int mouseX, int mouseY,
Expand Down

0 comments on commit d30f756

Please sign in to comment.