Added GuiRenderSettings to customize rendering
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user