Added GuiRenderSettings to customize rendering

This commit is contained in:
CrushedPixel
2015-05-24 01:26:01 +02:00
parent 18f22f57d0
commit 2b3bc2787a
8 changed files with 384 additions and 22 deletions

View File

@@ -1,6 +1,5 @@
package eu.crushedpixel.replaymod.gui;
import eu.crushedpixel.replaymod.ReplayMod;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager;
@@ -34,7 +33,6 @@ public class GuiVideoFramerateSlider extends GuiButton {
sliderValue = MathHelper.clamp_float(sliderValue, 0.0F, 1.0F);
int f = denormalizeValue(sliderValue);
this.displayString = displayKey + ": " + translate(f);
ReplayMod.replaySettings.setVideoFramerate(f);
}
mc.getTextureManager().bindTexture(buttonTextures);
@@ -44,6 +42,10 @@ public class GuiVideoFramerateSlider extends GuiButton {
}
}
public int getFPS() {
return denormalizeValue(sliderValue);
}
private float normalizeValue(int val) {
return (val - 10) / 110f;
}