Gui scale warning
This commit is contained in:
parent
3f76337c37
commit
b640363f36
|
@ -17,7 +17,7 @@ public class BPS extends RenderMod{
|
|||
}
|
||||
|
||||
public String getText(){
|
||||
return "[BPS: " + new DecimalFormat("0.##").format(getBPS() + "]");
|
||||
return "[BPS: " + new DecimalFormat("0.##").format(getBPS()) + "]";
|
||||
}
|
||||
|
||||
public void draw(){
|
||||
|
|
37
src/main/java/dev/resent/visual/ui/PreVideo.java
Normal file
37
src/main/java/dev/resent/visual/ui/PreVideo.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
package dev.resent.visual.ui;
|
||||
|
||||
import dev.resent.util.render.Color;
|
||||
import dev.resent.util.render.RenderUtils;
|
||||
import net.minecraft.client.gui.GuiOptions;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiVideoSettings;
|
||||
|
||||
public class PreVideo extends GuiScreen{
|
||||
|
||||
public GuiScreen uwu;
|
||||
|
||||
public PreVideo(GuiScreen from) {
|
||||
uwu = from;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
if(isMouseInside(parInt1, parInt2, width/2-50, height/2+40, width/2+50, height/2+70)) {
|
||||
this.mc.displayGuiScreen(new GuiOptions(uwu, mc.gameSettings));
|
||||
}else {
|
||||
this.mc.displayGuiScreen(new GuiVideoSettings(this, mc.gameSettings));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int i, int j, float var3) {
|
||||
this.drawDefaultBackground();
|
||||
drawCenteredString(mc.fontRendererObj, "Don't use Auto gui scale! Resent looks best with normal or large gui scales.", width/2, height/2, -1);
|
||||
drawCenteredString(mc.fontRendererObj, "Press anywhere to continue. Or, go", width/2, height/2+19, -1);
|
||||
RenderUtils.drawRoundedRect(width/2-50, height/2+40, width/2+50, height/2+70, 4, isMouseInside(i, j, width/2-50, height/2+40, width/2+50, height/2+70) ? new Color(40, 40, 40).getRGB() : new Color(21, 21, 21).getRGB());
|
||||
drawCenteredString(mc.fontRendererObj, "Back", width/2, height/2+51, -1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -124,7 +124,6 @@ public class ClickGuiRewrite extends GuiScreen {
|
|||
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/gear2.png"));
|
||||
Gui.drawModalRectWithCustomSizedTexture(x+width-60, (int) y+140+offset+scrollOffset, 0, 0, 20, 20, 20, 20);
|
||||
}
|
||||
//RenderUtils.drawRoundedRect(x+width-60, y+140+offset, x+width-40, y+160+offset, 4, -1);
|
||||
|
||||
//Toggle
|
||||
RenderUtils.drawRoundedRect(x+100, y+135+offset+scrollOffset, x+130, y+165+offset+scrollOffset, 8, m.isEnabled() ? onSurfaceColor : new Color(66, 66, 66).getRGB());
|
||||
|
@ -301,12 +300,13 @@ public class ClickGuiRewrite extends GuiScreen {
|
|||
}
|
||||
super.handleMouseInput();
|
||||
}
|
||||
|
||||
public boolean isMouseInside(double mouseX, double mouseY, double x, double y, double width, double height) {
|
||||
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
||||
}
|
||||
|
||||
|
||||
public int getMaxScroll() {
|
||||
return Resent.INSTANCE.modManager.modules.size() * -53;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGuiClosed() {
|
||||
mc.gameSettings.saveOptions();
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package net.minecraft.client.gui;
|
||||
|
||||
import dev.resent.visual.ui.PreVideo;
|
||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.vfs.SYS;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
|
@ -34,7 +35,7 @@ public class GuiOptions extends GuiScreen implements GuiYesNoCallback {
|
|||
|
||||
private static final GameSettings.Options[] field_146440_f = new GameSettings.Options[] { GameSettings.Options.FOV };
|
||||
private final GuiScreen field_146441_g;
|
||||
private final GameSettings game_settings_1;
|
||||
public final GameSettings game_settings_1;
|
||||
private GuiButton field_175357_i;
|
||||
private GuiLockIconButton field_175356_r;
|
||||
protected String field_146442_a = "Options";
|
||||
|
@ -161,7 +162,7 @@ public class GuiOptions extends GuiScreen implements GuiYesNoCallback {
|
|||
|
||||
if (parGuiButton.id == 101) {
|
||||
this.mc.gameSettings.saveOptions();
|
||||
this.mc.displayGuiScreen(new GuiVideoSettings(this, this.game_settings_1));
|
||||
this.mc.displayGuiScreen(new PreVideo(field_146441_g));
|
||||
}
|
||||
|
||||
if (parGuiButton.id == 100) {
|
||||
|
|
|
@ -558,6 +558,11 @@ public abstract class GuiScreen extends Gui implements GuiYesNoCallback {
|
|||
private void openWebLink(String parURI) {
|
||||
EagRuntime.openLink(parURI);
|
||||
}
|
||||
|
||||
public boolean isMouseInside(double mouseX, double mouseY, double x, double y, double width, double height) {
|
||||
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
||||
}
|
||||
|
||||
|
||||
/**+
|
||||
* Returns true if either windows ctrl key is down or if either
|
||||
|
|
Loading…
Reference in New Issue
Block a user