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;
|
||||
@@ -49,16 +48,19 @@ public class GuiVideoQualitySlider extends GuiButton {
|
||||
f = snapValue(f);
|
||||
sliderValue = normalizeValue(f);
|
||||
this.displayString = displayKey + ": " + translate(f);
|
||||
ReplayMod.replaySettings.setVideoQuality(f);
|
||||
}
|
||||
|
||||
mc.getTextureManager().bindTexture(buttonTextures);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.drawTexturedModalRect(this.xPosition + (int) (sliderValue * (float) (this.width - 8)), this.yPosition, 0, 66, 4, 20);
|
||||
this.drawTexturedModalRect(this.xPosition + (int) (sliderValue * (float) (this.width - 8)) + 4, this.yPosition, 196, 66, 4, 20);
|
||||
this.drawTexturedModalRect(this.xPosition + (int)Math.ceil(sliderValue * (float) (this.width - 8)), this.yPosition, 0, 66, 4, 20);
|
||||
this.drawTexturedModalRect(this.xPosition + (int)Math.ceil(sliderValue * (float) (this.width - 8)) + 4, this.yPosition, 196, 66, 4, 20);
|
||||
}
|
||||
}
|
||||
|
||||
public float getQuality() {
|
||||
return snapValue(denormalizeValue(sliderValue));
|
||||
}
|
||||
|
||||
private float snapValue(float val) {
|
||||
int i = Math.round(val * 10);
|
||||
return i / 10f;
|
||||
|
||||
Reference in New Issue
Block a user