aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java1
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java7
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java9
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java5
5 files changed, 17 insertions, 8 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
index 3a7f5c2..c18fc88 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
@@ -80,7 +80,8 @@ public class CottonInventoryScreen<T extends CottonCraftingController> extends A
@Override
public boolean keyPressed(int ch, int keyCode, int modifiers) {
- if (keyCode==GLFW.GLFW_KEY_ESCAPE) {
+ //System.out.println("Key " + Integer.toHexString(ch)+" "+Integer.toHexString(keyCode));
+ if (ch==GLFW.GLFW_KEY_ESCAPE) {
this.minecraft.player.closeContainer();
return true;
} else {
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java b/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java
index 985cb2d..b06369a 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java
@@ -6,6 +6,7 @@ import blue.endless.jankson.JsonObject;
import io.github.cottonmc.jankson.JanksonFactory;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.loader.api.FabricLoader;
+
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
index 31ab670..3377b2c 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
@@ -2,11 +2,10 @@ package io.github.cottonmc.cotton.gui.client;
import org.lwjgl.opengl.GL11;
+import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import io.github.cottonmc.cotton.gui.widget.data.Alignment;
-import net.minecraft.class_4493.class_4534;
-import net.minecraft.class_4493.class_4535;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.render.BufferBuilder;
@@ -36,7 +35,7 @@ public class ScreenDrawing {
BufferBuilder buffer = tessellator.getBufferBuilder();
RenderSystem.enableBlend();
//GlStateManager.disableTexture2D();
- RenderSystem.blendFuncSeparate(class_4535.SRC_ALPHA, class_4534.ONE_MINUS_SRC_ALPHA, class_4535.ONE, class_4534.ZERO);
+ RenderSystem.blendFuncSeparate(GlStateManager.class_4535.SRC_ALPHA, GlStateManager.class_4534.ONE_MINUS_SRC_ALPHA, GlStateManager.class_4535.ONE, GlStateManager.class_4534.ZERO);
RenderSystem.color4f(r, g, b, 1.0f);
buffer.begin(GL11.GL_QUADS, VertexFormats.POSITION_UV); //I thought GL_QUADS was deprecated but okay, sure.
buffer.vertex(x, y + height, 0).texture(u1, v2).next();
@@ -83,7 +82,7 @@ public class ScreenDrawing {
BufferBuilder buffer = tessellator.getBufferBuilder();
RenderSystem.enableBlend();
RenderSystem.disableTexture();
- RenderSystem.blendFuncSeparate(class_4535.SRC_ALPHA, class_4534.ONE_MINUS_SRC_ALPHA, class_4535.ONE, class_4534.ZERO);
+ RenderSystem.blendFuncSeparate(GlStateManager.class_4535.SRC_ALPHA, GlStateManager.class_4534.ONE_MINUS_SRC_ALPHA, GlStateManager.class_4535.ONE, GlStateManager.class_4534.ZERO);
RenderSystem.color4f(r, g, b, a);
buffer.begin(GL11.GL_QUADS, VertexFormats.POSITION); //I thought GL_QUADS was deprecated but okay, sure.
buffer.vertex(left, top + height, 0.0D).next();
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java b/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java
new file mode 100644
index 0000000..0af23ad
--- /dev/null
+++ b/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java
@@ -0,0 +1,9 @@
+package io.github.cottonmc.cotton.gui.style;
+
+import java.util.HashMap;
+
+public class StyleEntry {
+ private HashMap<String, String> customEntries = new HashMap<>();
+
+
+}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java
index d8d5955..cf7e444 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java
@@ -8,16 +8,15 @@ import javax.annotation.Nullable;
import org.lwjgl.glfw.GLFW;
import org.lwjgl.opengl.GL11;
+import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
-import net.minecraft.class_4493;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
-import net.minecraft.client.gl.GlProgramManager;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.render.BufferBuilder;
import net.minecraft.client.render.Tessellator;
@@ -407,7 +406,7 @@ public class WTextField extends WWidget {
RenderSystem.color4f(0.0F, 0.0F, 255.0F, 255.0F);
RenderSystem.disableTexture();
RenderSystem.enableColorLogicOp();
- RenderSystem.logicOp(class_4493.LogicOp.OR_REVERSE);
+ RenderSystem.logicOp(GlStateManager.LogicOp.OR_REVERSE);
bufferBuilder_1.begin(GL11.GL_QUADS, VertexFormats.POSITION);
bufferBuilder_1.vertex(x, y+height, 0.0D).next();
bufferBuilder_1.vertex(x+width, y+height, 0.0D).next();