Commit 6554065ee11765f613818210f8c034a6f5820cce

Authored by Mumfrey
1 parent e1d71003

more consistency with legacy GL methods for new convenience GL methods

java/client/com/mumfrey/liteloader/client/gui/GuiPanel.java
@@ -2,15 +2,16 @@ package com.mumfrey.liteloader.client.gui; @@ -2,15 +2,16 @@ package com.mumfrey.liteloader.client.gui;
2 2
3 import static com.mumfrey.liteloader.gl.GL.*; 3 import static com.mumfrey.liteloader.gl.GL.*;
4 4
  5 +import java.io.IOException;
5 import java.util.LinkedList; 6 import java.util.LinkedList;
6 import java.util.List; 7 import java.util.List;
7 8
8 -import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;  
9 -  
10 import net.minecraft.client.Minecraft; 9 import net.minecraft.client.Minecraft;
11 import net.minecraft.client.gui.Gui; 10 import net.minecraft.client.gui.Gui;
12 import net.minecraft.client.gui.GuiButton; 11 import net.minecraft.client.gui.GuiButton;
13 12
  13 +import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;
  14 +
14 /** 15 /**
15 * Base class for panels 16 * Base class for panels
16 * 17 *
@@ -124,7 +125,7 @@ public abstract class GuiPanel extends Gui @@ -124,7 +125,7 @@ public abstract class GuiPanel extends Gui
124 * @param mouseY 125 * @param mouseY
125 * @param mouseButton 126 * @param mouseButton
126 */ 127 */
127 - void mousePressed(int mouseX, int mouseY, int mouseButton) 128 + void mousePressed(int mouseX, int mouseY, int mouseButton) throws IOException
128 { 129 {
129 if (mouseButton == 0) 130 if (mouseButton == 0)
130 { 131 {
java/client/com/mumfrey/liteloader/client/gui/GuiPanelAbout.java
1 package com.mumfrey.liteloader.client.gui; 1 package com.mumfrey.liteloader.client.gui;
2 2
  3 +import java.io.IOException;
3 import java.net.URI; 4 import java.net.URI;
4 import java.util.ArrayList; 5 import java.util.ArrayList;
5 import java.util.List; 6 import java.util.List;
@@ -215,7 +216,7 @@ class GuiPanelAbout extends GuiPanel implements ScrollPanelContent @@ -215,7 +216,7 @@ class GuiPanelAbout extends GuiPanel implements ScrollPanelContent
215 } 216 }
216 217
217 @Override 218 @Override
218 - void mousePressed(int mouseX, int mouseY, int mouseButton) 219 + void mousePressed(int mouseX, int mouseY, int mouseButton) throws IOException
219 { 220 {
220 this.scrollPane.mousePressed(mouseX, mouseY, mouseButton); 221 this.scrollPane.mousePressed(mouseX, mouseY, mouseButton);
221 222
java/client/com/mumfrey/liteloader/client/gui/GuiPanelConfigContainer.java
@@ -2,6 +2,9 @@ package com.mumfrey.liteloader.client.gui; @@ -2,6 +2,9 @@ package com.mumfrey.liteloader.client.gui;
2 2
3 import static com.mumfrey.liteloader.gl.GL.*; 3 import static com.mumfrey.liteloader.gl.GL.*;
4 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*; 4 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
  5 +
  6 +import java.io.IOException;
  7 +
5 import net.minecraft.client.Minecraft; 8 import net.minecraft.client.Minecraft;
6 import net.minecraft.client.gui.GuiButton; 9 import net.minecraft.client.gui.GuiButton;
7 import net.minecraft.client.resources.I18n; 10 import net.minecraft.client.resources.I18n;
@@ -215,9 +218,10 @@ class GuiPanelConfigContainer extends GuiPanel implements ConfigPanelHost @@ -215,9 +218,10 @@ class GuiPanelConfigContainer extends GuiPanel implements ConfigPanelHost
215 * @param mouseX 218 * @param mouseX
216 * @param mouseY 219 * @param mouseY
217 * @param mouseButton 220 * @param mouseButton
  221 + * @throws IOException
218 */ 222 */
219 @Override 223 @Override
220 - void mousePressed(int mouseX, int mouseY, int mouseButton) 224 + void mousePressed(int mouseX, int mouseY, int mouseButton) throws IOException
221 { 225 {
222 if (mouseButton == 0) 226 if (mouseButton == 0)
223 { 227 {
java/client/com/mumfrey/liteloader/client/gui/GuiPanelError.java
1 package com.mumfrey.liteloader.client.gui; 1 package com.mumfrey.liteloader.client.gui;
2 2
  3 +import java.io.IOException;
3 import java.io.PrintWriter; 4 import java.io.PrintWriter;
4 import java.io.StringWriter; 5 import java.io.StringWriter;
5 import java.util.ArrayList; 6 import java.util.ArrayList;
@@ -130,7 +131,7 @@ public class GuiPanelError extends GuiPanel implements ScrollPanelContent @@ -130,7 +131,7 @@ public class GuiPanelError extends GuiPanel implements ScrollPanelContent
130 } 131 }
131 132
132 @Override 133 @Override
133 - void mousePressed(int mouseX, int mouseY, int mouseButton) 134 + void mousePressed(int mouseX, int mouseY, int mouseButton) throws IOException
134 { 135 {
135 this.scrollPane.mousePressed(mouseX, mouseY, mouseButton); 136 this.scrollPane.mousePressed(mouseX, mouseY, mouseButton);
136 super.mousePressed(mouseX, mouseY, mouseButton); 137 super.mousePressed(mouseX, mouseY, mouseButton);
java/client/com/mumfrey/liteloader/client/gui/GuiPanelLiteLoaderLog.java
@@ -2,6 +2,7 @@ package com.mumfrey.liteloader.client.gui; @@ -2,6 +2,7 @@ package com.mumfrey.liteloader.client.gui;
2 2
3 import static com.mumfrey.liteloader.gl.GL.*; 3 import static com.mumfrey.liteloader.gl.GL.*;
4 4
  5 +import java.io.IOException;
5 import java.net.URI; 6 import java.net.URI;
6 import java.util.ArrayList; 7 import java.util.ArrayList;
7 import java.util.List; 8 import java.util.List;
@@ -332,9 +333,10 @@ class GuiPanelLiteLoaderLog extends GuiPanel implements ScrollPanelContent @@ -332,9 +333,10 @@ class GuiPanelLiteLoaderLog extends GuiPanel implements ScrollPanelContent
332 * @param mouseX 333 * @param mouseX
333 * @param mouseY 334 * @param mouseY
334 * @param mouseButton 335 * @param mouseButton
  336 + * @throws IOException
335 */ 337 */
336 @Override 338 @Override
337 - void mousePressed(int mouseX, int mouseY, int mouseButton) 339 + void mousePressed(int mouseX, int mouseY, int mouseButton) throws IOException
338 { 340 {
339 this.scrollPane.mousePressed(mouseX, mouseY, mouseButton); 341 this.scrollPane.mousePressed(mouseX, mouseY, mouseButton);
340 342
java/client/com/mumfrey/liteloader/client/gui/GuiPanelMods.java
@@ -3,6 +3,7 @@ package com.mumfrey.liteloader.client.gui; @@ -3,6 +3,7 @@ package com.mumfrey.liteloader.client.gui;
3 import static com.mumfrey.liteloader.gl.GL.*; 3 import static com.mumfrey.liteloader.gl.GL.*;
4 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*; 4 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
5 5
  6 +import java.io.IOException;
6 import java.util.ArrayList; 7 import java.util.ArrayList;
7 import java.util.List; 8 import java.util.List;
8 import java.util.Map; 9 import java.util.Map;
@@ -163,7 +164,7 @@ public class GuiPanelMods extends GuiPanel @@ -163,7 +164,7 @@ public class GuiPanelMods extends GuiPanel
163 } 164 }
164 165
165 @Override 166 @Override
166 - void mousePressed(int mouseX, int mouseY, int mouseButton) 167 + void mousePressed(int mouseX, int mouseY, int mouseButton) throws IOException
167 { 168 {
168 if (mouseButton == 0) 169 if (mouseButton == 0)
169 { 170 {
java/client/com/mumfrey/liteloader/client/gui/GuiScrollPanel.java
@@ -2,6 +2,9 @@ package com.mumfrey.liteloader.client.gui; @@ -2,6 +2,9 @@ package com.mumfrey.liteloader.client.gui;
2 2
3 import static com.mumfrey.liteloader.gl.GL.*; 3 import static com.mumfrey.liteloader.gl.GL.*;
4 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*; 4 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
  5 +
  6 +import java.io.IOException;
  7 +
5 import net.minecraft.client.Minecraft; 8 import net.minecraft.client.Minecraft;
6 import net.minecraft.client.gui.GuiButton; 9 import net.minecraft.client.gui.GuiButton;
7 10
@@ -139,7 +142,7 @@ class GuiScrollPanel extends GuiPanel @@ -139,7 +142,7 @@ class GuiScrollPanel extends GuiPanel
139 } 142 }
140 143
141 @Override 144 @Override
142 - public void mousePressed(int mouseX, int mouseY, int mouseButton) 145 + public void mousePressed(int mouseX, int mouseY, int mouseButton) throws IOException
143 { 146 {
144 mouseY += this.scrollBar.getValue() - this.top; 147 mouseY += this.scrollBar.getValue() - this.top;
145 mouseX -= this.left; 148 mouseX -= this.left;
java/client/com/mumfrey/liteloader/client/gui/startup/LoadingBar.java
@@ -248,7 +248,7 @@ public class LoadingBar extends LoadingProgress @@ -248,7 +248,7 @@ public class LoadingBar extends LoadingProgress
248 248
249 glDisableLighting(); 249 glDisableLighting();
250 glDisableFog(); 250 glDisableFog();
251 - glDisableDepth(); 251 + glDisableDepthTest();
252 glEnableTexture2D(); 252 glEnableTexture2D();
253 253
254 this.textureManager.bindTexture(this.textureLocation); 254 this.textureManager.bindTexture(this.textureLocation);
java/client/com/mumfrey/liteloader/gl/GL.java
@@ -861,12 +861,12 @@ public class GL @@ -861,12 +861,12 @@ public class GL
861 GlStateManager.colorMaterial(face, mode); 861 GlStateManager.colorMaterial(face, mode);
862 } 862 }
863 863
864 - public static void glDisableDepth() 864 + public static void glDisableDepthTest()
865 { 865 {
866 GlStateManager.disableDepth(); 866 GlStateManager.disableDepth();
867 } 867 }
868 868
869 - public static void glEnableDepth() 869 + public static void glEnableDepthTest()
870 { 870 {
871 GlStateManager.enableDepth(); 871 GlStateManager.enableDepth();
872 } 872 }
@@ -1021,7 +1021,7 @@ public class GL @@ -1021,7 +1021,7 @@ public class GL
1021 GlStateManager.deleteTexture(textureName); // TODO OBF MCPTEST func_179150_h - deleteTexture 1021 GlStateManager.deleteTexture(textureName); // TODO OBF MCPTEST func_179150_h - deleteTexture
1022 } 1022 }
1023 1023
1024 - public static void glBindTexture(int textureName) 1024 + public static void glBindTexture2D(int textureName)
1025 { 1025 {
1026 GlStateManager.bindTexture(textureName); // TODO OBF MCPTEST func_179144_i - bindTexture 1026 GlStateManager.bindTexture(textureName); // TODO OBF MCPTEST func_179144_i - bindTexture
1027 } 1027 }
java/common/com/mumfrey/liteloader/modconfig/ConfigPanel.java
1 package com.mumfrey.liteloader.modconfig; 1 package com.mumfrey.liteloader.modconfig;
2 2
  3 +import java.io.IOException;
  4 +
3 /** 5 /**
4 * Interface for mod config panels to implement 6 * Interface for mod config panels to implement
5 * 7 *
@@ -59,7 +61,7 @@ public interface ConfigPanel @@ -59,7 +61,7 @@ public interface ConfigPanel
59 * @param mouseY 61 * @param mouseY
60 * @param mouseButton 62 * @param mouseButton
61 */ 63 */
62 - public abstract void mousePressed(ConfigPanelHost host, int mouseX, int mouseY, int mouseButton); 64 + public abstract void mousePressed(ConfigPanelHost host, int mouseX, int mouseY, int mouseButton) throws IOException;
63 65
64 /** 66 /**
65 * Called when a mouse button is released 67 * Called when a mouse button is released