u41
This commit is contained in:
parent
207270171f
commit
660214e781
20 changed files with 318 additions and 111 deletions
|
|
@ -43,6 +43,7 @@ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
|
|||
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFontRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
|
||||
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
|
||||
import net.lax1dude.eaglercraft.v1_8.notifications.ServerNotificationRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
|
|
@ -523,6 +524,11 @@ public class Minecraft implements IThreadListener {
|
|||
mainMenu = new GuiConnecting(mainMenu, this, this.serverName, this.serverPort);
|
||||
}
|
||||
|
||||
int vidIssues = gameSettings.checkBadVideoSettings();
|
||||
if (vidIssues != 0) {
|
||||
mainMenu = new GuiScreenVideoSettingsWarning(mainMenu, vidIssues);
|
||||
}
|
||||
|
||||
mainMenu = new GuiScreenEditProfile(mainMenu);
|
||||
|
||||
if (!EagRuntime.getConfiguration().isForceProfanityFilter() && !gameSettings.hasShownProfanityFilter) {
|
||||
|
|
@ -1547,8 +1553,9 @@ public class Minecraft implements IThreadListener {
|
|||
this.displayGuiScreen(new GuiChat("/"));
|
||||
}
|
||||
|
||||
boolean miningTouch = isMiningTouch();
|
||||
boolean useTouch = thePlayer.getItemShouldUseOnTouchEagler();
|
||||
boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||
boolean miningTouch = touchMode && isMiningTouch();
|
||||
boolean useTouch = touchMode && thePlayer.getItemShouldUseOnTouchEagler();
|
||||
if (this.thePlayer.isUsingItem()) {
|
||||
if (!this.gameSettings.keyBindUseItem.isKeyDown() && !miningTouch) {
|
||||
this.playerController.onStoppedUsingItem(this.thePlayer);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package net.minecraft.client.gui;
|
|||
import java.io.IOException;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.Display;
|
||||
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
|
||||
|
|
@ -115,9 +116,13 @@ public class GuiVideoSettings extends GuiScreen {
|
|||
if (parGuiButton.enabled) {
|
||||
if (parGuiButton.id == 200) {
|
||||
this.mc.gameSettings.saveOptions();
|
||||
this.mc.displayGuiScreen(this.parentGuiScreen);
|
||||
GuiScreen contScreen = parentGuiScreen;
|
||||
int vidIssues = mc.gameSettings.checkBadVideoSettings();
|
||||
if (vidIssues != 0) {
|
||||
contScreen = new GuiScreenVideoSettingsWarning(contScreen, vidIssues);
|
||||
}
|
||||
this.mc.displayGuiScreen(contScreen);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
|
|||
import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredConfig;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
|
|
@ -212,6 +213,7 @@ public class GameSettings {
|
|||
public boolean hasShownProfanityFilter = false;
|
||||
public float touchControlOpacity = 1.0f;
|
||||
public boolean hideDefaultUsernameWarning = false;
|
||||
public boolean hideVideoSettingsWarning = false;
|
||||
|
||||
public int voiceListenRadius = 16;
|
||||
public float voiceListenVolume = 0.5f;
|
||||
|
|
@ -1077,6 +1079,10 @@ public class GameSettings {
|
|||
this.hideDefaultUsernameWarning = astring[1].equals("true");
|
||||
}
|
||||
|
||||
if (astring[0].equals("hideVideoSettingsWarning")) {
|
||||
hideVideoSettingsWarning = astring[1].equals("true");
|
||||
}
|
||||
|
||||
deferredShaderConf.readOption(astring[0], astring[1]);
|
||||
} catch (Exception var8) {
|
||||
logger.warn("Skipping bad option: " + s);
|
||||
|
|
@ -1219,6 +1225,7 @@ public class GameSettings {
|
|||
printwriter.println("screenRecordMicVolume:" + this.screenRecordMicVolume);
|
||||
printwriter.println("touchControlOpacity:" + this.touchControlOpacity);
|
||||
printwriter.println("hideDefaultUsernameWarning:" + this.hideDefaultUsernameWarning);
|
||||
printwriter.println("hideVideoSettingsWarning:" + this.hideVideoSettingsWarning);
|
||||
|
||||
for (KeyBinding keybinding : this.keyBindings) {
|
||||
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
||||
|
|
@ -1317,6 +1324,22 @@ public class GameSettings {
|
|||
return arr.toString();
|
||||
}
|
||||
|
||||
public int checkBadVideoSettings() {
|
||||
return hideVideoSettingsWarning ? 0
|
||||
: ((renderDistanceChunks > 6 ? GuiScreenVideoSettingsWarning.WARNING_RENDER_DISTANCE : 0)
|
||||
| (!enableVsync ? GuiScreenVideoSettingsWarning.WARNING_VSYNC : 0)
|
||||
| (limitFramerate < 30 ? GuiScreenVideoSettingsWarning.WARNING_FRAME_LIMIT : 0));
|
||||
}
|
||||
|
||||
public void fixBadVideoSettings() {
|
||||
if (renderDistanceChunks > 6)
|
||||
renderDistanceChunks = 4;
|
||||
if (!enableVsync)
|
||||
enableVsync = true;
|
||||
if (limitFramerate < 30)
|
||||
limitFramerate = 260;
|
||||
}
|
||||
|
||||
public static enum Options {
|
||||
INVERT_MOUSE("options.invertMouse", false, true), SENSITIVITY("options.sensitivity", true, false),
|
||||
FOV("options.fov", true, false, 30.0F, 110.0F, 1.0F), GAMMA("options.gamma", true, false),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue