Merge branch 'main' of gitlab.com:jeseibel/minecraft-lod-mod
This commit is contained in:
@@ -30,6 +30,7 @@ import com.seibel.lod.core.config.*;
|
||||
// Minecraft imports
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.seibel.lod.core.jar.updater.SelfUpdater;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Font;
|
||||
@@ -271,7 +272,6 @@ public abstract class ClassicConfigGUI {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -279,6 +279,8 @@ public abstract class ClassicConfigGUI {
|
||||
this.renderBackground(matrices); // Renders background
|
||||
this.list.render(matrices, mouseX, mouseY, delta); // Render buttons
|
||||
drawCenteredString(matrices, font, title, width / 2, 15, 0xFFFFFF); // Render title
|
||||
if (SelfUpdater.deleteOldOnClose)
|
||||
drawString(matrices, font, new TranslatableComponent("lod.updater.waitingForClose"), 4, height-38, 0xFFFFFF);
|
||||
|
||||
// Render the tooltip only if it can find a tooltip in the language file
|
||||
for (AbstractConfigType info : ConfigBase.INSTANCE.entries) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.seibel.lod.common.wrappers.gui;
|
||||
|
||||
import com.seibel.lod.core.ModInfo;
|
||||
import com.seibel.lod.core.config.ConfigBase;
|
||||
import com.seibel.lod.core.config.gui.ConfigScreen;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
@@ -15,7 +16,7 @@ public class GetConfigScreen {
|
||||
if (useScreen == type.Classic) {
|
||||
return ClassicConfigGUI.getScreen(ConfigBase.INSTANCE, parent, "client");
|
||||
} else if (useScreen == type.OpenGL) {
|
||||
return ConfigScreenMC.getScreen(parent, new ConfigScreen());
|
||||
return MinecraftScreen.getScreen(parent, new ConfigScreen(), ModInfo.ID + ".title");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
+5
-7
@@ -1,7 +1,6 @@
|
||||
package com.seibel.lod.common.wrappers.gui;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.seibel.lod.core.ModInfo;
|
||||
import com.seibel.lod.core.config.gui.AbstractScreen;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.components.ContainerObjectSelectionList;
|
||||
@@ -9,10 +8,9 @@ import net.minecraft.client.gui.screens.Screen;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class ConfigScreenMC {
|
||||
public static Screen getScreen(Screen parent, AbstractScreen screen) {
|
||||
|
||||
return new ConfigScreenRenderer(parent, screen);
|
||||
public class MinecraftScreen {
|
||||
public static Screen getScreen(Screen parent, AbstractScreen screen, String translationName) {
|
||||
return new ConfigScreenRenderer(parent, screen, translationName);
|
||||
}
|
||||
|
||||
private static class ConfigScreenRenderer extends Screen {
|
||||
@@ -31,8 +29,8 @@ public class ConfigScreenMC {
|
||||
}
|
||||
#endif
|
||||
|
||||
protected ConfigScreenRenderer(Screen parent, AbstractScreen screen) {
|
||||
super(translate(ModInfo.ID + ".config.title"));
|
||||
protected ConfigScreenRenderer(Screen parent, AbstractScreen screen, String translationName) {
|
||||
super(translate(translationName));
|
||||
this.parent = parent;
|
||||
this.screen = screen;
|
||||
}
|
||||
+1
-1
Submodule coreSubProjects updated: 1a047e14b6...32456c3110
Reference in New Issue
Block a user