Added Checkbox to GuiRenderSettings to enable/disable Name Tag rendering
This commit is contained in:
@@ -71,6 +71,7 @@ public class GuiConstants {
|
||||
public static final int RENDER_SETTINGS_COLOR_PICKER = 9014;
|
||||
public static final int RENDER_SETTINGS_ENABLE_GREENSCREEN = 9015;
|
||||
public static final int RENDER_SETTINGS_OUTPUT_CHOOSER = 9016;
|
||||
public static final int RENDER_SETTINGS_RENDER_NAMETAGS = 9017;
|
||||
|
||||
public static final int REPLAY_SETTINGS_RECORDSERVER_ID = 9004;
|
||||
public static final int REPLAY_SETTINGS_RECORDSP_ID = 9005;
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiErrorScreen;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
import net.minecraftforge.fml.client.config.GuiCheckBox;
|
||||
@@ -45,7 +46,7 @@ public class GuiRenderSettings extends GuiScreen {
|
||||
|
||||
private int virtualY, virtualHeight;
|
||||
|
||||
private GuiCheckBox ignoreCamDir, enableGreenscreen;
|
||||
private GuiCheckBox ignoreCamDir, enableGreenscreen, renderNameTags;
|
||||
private GuiNumberInput xRes, yRes;
|
||||
private GuiToggleButton interpolation, forceChunks;
|
||||
private GuiVideoFramerateSlider framerateSlider;
|
||||
@@ -161,6 +162,7 @@ public class GuiRenderSettings extends GuiScreen {
|
||||
forceChunks.width = interpolation.width = framerateSlider.width = 150;
|
||||
|
||||
enableGreenscreen = new GuiCheckBox(GuiConstants.RENDER_SETTINGS_ENABLE_GREENSCREEN, 0, 0, I18n.format("replaymod.gui.rendersettings.chromakey"), false);
|
||||
renderNameTags = new GuiCheckBox(GuiConstants.RENDER_SETTINGS_RENDER_NAMETAGS, 0, 0, I18n.format("replaymod.gui.rendersettings.nametags"), true);
|
||||
|
||||
colorPicker = new GuiColorPicker(GuiConstants.RENDER_SETTINGS_COLOR_PICKER, 0, 0, I18n.format("replaymod.gui.rendersettings.skycolor")+": ", 0, 0);
|
||||
colorPicker.enabled = enableGreenscreen.isChecked();
|
||||
@@ -190,6 +192,7 @@ public class GuiRenderSettings extends GuiScreen {
|
||||
advancedButtons.add(forceChunks);
|
||||
advancedButtons.add(enableGreenscreen);
|
||||
advancedButtons.add(colorPicker);
|
||||
advancedButtons.add(renderNameTags);
|
||||
}
|
||||
|
||||
virtualHeight = 200;
|
||||
@@ -267,7 +270,7 @@ public class GuiRenderSettings extends GuiScreen {
|
||||
|
||||
commandInput.width = 55;
|
||||
commandInput.xPosition = (this.width-305)/2;
|
||||
commandInput.yPosition = ffmpegArguments.yPosition = this.virtualY + 20 + ((i/2)*25);
|
||||
commandInput.yPosition = ffmpegArguments.yPosition = advancedButtons.get(advancedButtons.size()-1).yPosition + 20;
|
||||
|
||||
ffmpegArguments.width = 245;
|
||||
ffmpegArguments.xPosition = commandInput.xPosition+commandInput.width+5;
|
||||
@@ -287,10 +290,6 @@ public class GuiRenderSettings extends GuiScreen {
|
||||
toHandle.addAll(permanentButtons);
|
||||
toHandle.addAll(advancedTab ? advancedButtons : defaultButtons);
|
||||
|
||||
for(GuiButton b : toHandle) {
|
||||
b.drawButton(mc, mouseX, mouseY);
|
||||
}
|
||||
|
||||
if(!advancedTab) {
|
||||
this.drawString(fontRendererObj, I18n.format("replaymod.gui.rendersettings.renderer") + ":",
|
||||
(width - w1) / 2, rendererDropdown.yPosition + 6, Color.WHITE.getRGB());
|
||||
@@ -326,6 +325,11 @@ public class GuiRenderSettings extends GuiScreen {
|
||||
}
|
||||
}
|
||||
|
||||
for(GuiButton b : toHandle) {
|
||||
b.drawButton(mc, mouseX, mouseY);
|
||||
GlStateManager.enableBlend();
|
||||
}
|
||||
|
||||
renderButton.drawOverlay(mc, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@@ -499,6 +503,8 @@ public class GuiRenderSettings extends GuiScreen {
|
||||
options.setSkyColor(colorPicker.getPickedColor());
|
||||
}
|
||||
|
||||
options.setHideNameTags(!renderNameTags.isChecked());
|
||||
|
||||
options.setWidth(getWidthSetting());
|
||||
options.setHeight(getHeightSetting());
|
||||
|
||||
|
||||
@@ -321,11 +321,12 @@ replaymod.gui.rendersettings.framerate=Video Framerate
|
||||
replaymod.gui.rendersettings.quality=Video Quality
|
||||
replaymod.gui.rendersettings.chromakey=Chroma Keying
|
||||
replaymod.gui.rendersettings.skycolor=Sky Color
|
||||
replaymod.gui.rendersettings.nametags=Render Name Tags
|
||||
replaymod.gui.rendersettings.outputfile=Output File
|
||||
|
||||
replaymod.gui.rendersettings.command=Command
|
||||
replaymod.gui.rendersettings.arguments=Command Line Arguments
|
||||
replaymod.gui.rendersettings.ffmpeg.description=By default, the Replay Mod will render videos as .webm files. If you are an advanced user, you can customize the command line parameters used to export the video. For more information, check http://replaymod.com/docs
|
||||
replaymod.gui.rendersettings.ffmpeg.description=If you are an advanced user, you can customize the command line parameters used to export the video. For more information, check http://replaymod.com/docs
|
||||
|
||||
replaymod.gui.rendersettings.stablecamera=Ignore Camera Rotation
|
||||
replaymod.gui.rendersettings.exportyoutube=Export for YouTube
|
||||
|
||||
Reference in New Issue
Block a user