:check:
This commit is contained in:
parent
d828b919ce
commit
69595d3c32
61530
javascript/classes.js
61530
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,7 @@
|
||||||
package dev.resent.ui;
|
package dev.resent.ui;
|
||||||
|
|
||||||
import dev.resent.util.render.RenderUtils;
|
import dev.resent.util.render.RenderUtils;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
@ -8,19 +9,27 @@ import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class PreGUI extends GuiScreen{
|
public class PreGUI extends GuiScreen{
|
||||||
|
|
||||||
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int i, int j, float var3) {
|
public void drawScreen(int i, int j, float var3) {
|
||||||
|
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("eagler:gui/logo.png"));
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.translate(0, 0.75f, 0);
|
||||||
|
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/logo.png"));
|
||||||
Gui.drawModalRectWithCustomSizedTexture(GuiScreen.width/2-20, GuiScreen.height/2-50, 0, 0, 60, 60, 60, 60);
|
Gui.drawModalRectWithCustomSizedTexture(GuiScreen.width/2-20, GuiScreen.height/2-50, 0, 0, 60, 60, 60, 60);
|
||||||
Gui.drawRect(GuiScreen.width/2-40, GuiScreen.height/2+10, GuiScreen.width/2+40, GuiScreen.height/2+30, isMouseInside(i, j, GuiScreen.width/2-25, GuiScreen.height/2-10, GuiScreen.width/2+25, GuiScreen.height/2+10) ? 0x30FFFFFF : 0x40FFFFFF);
|
|
||||||
RenderUtils.drawRectOutline(GuiScreen.width/2-40, GuiScreen.height/2+10, GuiScreen.width/2+40, GuiScreen.height/2+30, 0x80FFFFFF);
|
Gui.drawRect(GuiScreen.width/2-30, GuiScreen.height/2+20, GuiScreen.width/2+50, GuiScreen.height/2+50, isMouseInside(i, j, GuiScreen.width/2-30, GuiScreen.height/2+20, GuiScreen.width/2+50, GuiScreen.height/2+50) ? 0x40FFFFFF : 0x50FFFFFF);
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawString("Settings", GuiScreen.width/2-Minecraft.getMinecraft().fontRendererObj.getStringWidth("Settings")/2, GuiScreen.height/2+30-Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT/2, -1);
|
RenderUtils.drawRectOutline(GuiScreen.width/2-30, GuiScreen.height/2+20, GuiScreen.width/2+50, GuiScreen.height/2+50, 0x080FFFFFF);
|
||||||
|
RenderUtils.drawCenteredScaledString("Settings", GuiScreen.width/2+10, GuiScreen.height/2+35-mc.fontRendererObj.FONT_HEIGHT/2, -1, 1.5f);
|
||||||
super.drawScreen(i, j, var3);
|
super.drawScreen(i, j, var3);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||||
|
if(isMouseInside(parInt1, parInt2, GuiScreen.width/2-30, GuiScreen.height/2+20, GuiScreen.width/2+50, GuiScreen.height/2+50) && parInt3 == 0){
|
||||||
|
mc.displayGuiScreen(new ClickGUI());
|
||||||
|
}
|
||||||
super.mouseClicked(parInt1, parInt2, parInt3);
|
super.mouseClicked(parInt1, parInt2, parInt3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class Gui {
|
||||||
* Args : renderer, string, x, y, color
|
* Args : renderer, string, x, y, color
|
||||||
*/
|
*/
|
||||||
public static void drawCenteredString(FontRenderer fontRendererIn, String text, int x, int y, int color) {
|
public static void drawCenteredString(FontRenderer fontRendererIn, String text, int x, int y, int color) {
|
||||||
fontRendererIn.drawStringWithShadow(text, (float) (x - fontRendererIn.getStringWidth(text) / 2), (float) y, color);
|
fontRendererIn.drawString(text, (float) (x - fontRendererIn.getStringWidth(text) / 2), (float) y, color, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
|
|
Loading…
Reference in New Issue
Block a user