Tweaked GuiDropdown a bit
Continued work on GuiReplayStudio
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
package eu.crushedpixel.replaymod;
|
package eu.crushedpixel.replaymod;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
@@ -14,7 +12,6 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
|||||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
import eu.crushedpixel.replaymod.api.client.ApiClient;
|
import eu.crushedpixel.replaymod.api.client.ApiClient;
|
||||||
import eu.crushedpixel.replaymod.editor.ReplayTrimmer;
|
|
||||||
import eu.crushedpixel.replaymod.events.GuiEventHandler;
|
import eu.crushedpixel.replaymod.events.GuiEventHandler;
|
||||||
import eu.crushedpixel.replaymod.events.GuiReplayOverlay;
|
import eu.crushedpixel.replaymod.events.GuiReplayOverlay;
|
||||||
import eu.crushedpixel.replaymod.events.KeyInputHandler;
|
import eu.crushedpixel.replaymod.events.KeyInputHandler;
|
||||||
|
|||||||
@@ -35,4 +35,7 @@ public class GuiConstants {
|
|||||||
public static final int REPLAY_EDITOR_TRIM_TAB = 5000;
|
public static final int REPLAY_EDITOR_TRIM_TAB = 5000;
|
||||||
public static final int REPLAY_EDITOR_CONNECT_TAB = 5001;
|
public static final int REPLAY_EDITOR_CONNECT_TAB = 5001;
|
||||||
public static final int REPLAY_EDITOR_MODIFY_TAB = 5002;
|
public static final int REPLAY_EDITOR_MODIFY_TAB = 5002;
|
||||||
|
|
||||||
|
public static final int REPLAY_EDITOR_SAVEMODE_BUTTON = 5003;
|
||||||
|
public static final int REPLAY_EDITOR_SAVE_BUTTON = 5004;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,17 +22,19 @@ public class GuiDropdown extends GuiTextField {
|
|||||||
private final int maxDropoutHeight = dropoutElementHeight*visibleDropout;
|
private final int maxDropoutHeight = dropoutElementHeight*visibleDropout;
|
||||||
|
|
||||||
private int upperIndex = 0;
|
private int upperIndex = 0;
|
||||||
|
|
||||||
public GuiDropdown(int id, FontRenderer fontRenderer,
|
public GuiDropdown(int id, FontRenderer fontRenderer,
|
||||||
int xPos, int yPos, int width) {
|
int xPos, int yPos, int width) {
|
||||||
super(id, fontRenderer, xPos, yPos, width, 20);
|
super(id, fontRenderer, xPos, yPos, width, 20);
|
||||||
|
setCursorPositionZero();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawTextBox() {
|
public void drawTextBox() {
|
||||||
|
setCursorPositionZero();
|
||||||
if(elements.size() > selectionIndex) {
|
if(elements.size() > selectionIndex) {
|
||||||
setText(elements.get(selectionIndex).toString());
|
setText(mc.fontRendererObj.trimStringToWidth(
|
||||||
|
elements.get(selectionIndex).toString(), width-8));
|
||||||
} else {
|
} else {
|
||||||
setText("");
|
setText("");
|
||||||
}
|
}
|
||||||
@@ -47,17 +49,17 @@ public class GuiDropdown extends GuiTextField {
|
|||||||
drawHorizontalLine(xPosition+width-height+i+4, xPosition+width-i-4, yPosition+(height/4)+i+2, -6250336);
|
drawHorizontalLine(xPosition+width-height+i+4, xPosition+width-i-4, yPosition+(height/4)+i+2, -6250336);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(open) {
|
if(open && elements.size() > 0) {
|
||||||
//draw the dropout part when opened
|
//draw the dropout part when opened
|
||||||
|
|
||||||
boolean drawScrollBar = false;
|
boolean drawScrollBar = false;
|
||||||
|
|
||||||
int requiredHeight = elements.size()*dropoutElementHeight;
|
int requiredHeight = elements.size()*dropoutElementHeight;
|
||||||
if(requiredHeight > maxDropoutHeight) {
|
if(requiredHeight > maxDropoutHeight) {
|
||||||
requiredHeight = maxDropoutHeight;
|
requiredHeight = maxDropoutHeight;
|
||||||
drawScrollBar = true;
|
drawScrollBar = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//The light outline
|
//The light outline
|
||||||
drawRect(xPosition-1, yPosition+height, xPosition+width+1, yPosition+height+requiredHeight+1, -6250336);
|
drawRect(xPosition-1, yPosition+height, xPosition+width+1, yPosition+height+requiredHeight+1, -6250336);
|
||||||
|
|
||||||
@@ -73,7 +75,8 @@ public class GuiDropdown extends GuiTextField {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
drawHorizontalLine(xPosition, xPosition+width, yPosition+height+y, -6250336);
|
drawHorizontalLine(xPosition, xPosition+width, yPosition+height+y, -6250336);
|
||||||
drawString(mc.fontRendererObj, obj.toString(), xPosition+4, yPosition+height+y+4, Color.WHITE.getRGB());
|
String toWrite = mc.fontRendererObj.trimStringToWidth(obj.toString(), width-8);
|
||||||
|
drawString(mc.fontRendererObj, toWrite, xPosition+4, yPosition+height+y+4, Color.WHITE.getRGB());
|
||||||
|
|
||||||
y += dropoutElementHeight;
|
y += dropoutElementHeight;
|
||||||
i++;
|
i++;
|
||||||
@@ -81,26 +84,26 @@ public class GuiDropdown extends GuiTextField {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(drawScrollBar) {
|
if(drawScrollBar) {
|
||||||
//The scroll bar
|
//The scroll bar
|
||||||
int dw = Mouse.getDWheel();
|
int dw = Mouse.getDWheel();
|
||||||
if(dw > 0) {
|
if(dw > 0) {
|
||||||
dw = -1;
|
dw = -1;
|
||||||
} else if(dw < 0) {
|
} else if(dw < 0) {
|
||||||
dw = 1;
|
dw = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
upperIndex = Math.max(Math.min(upperIndex+dw, elements.size()-visibleDropout), 0);
|
upperIndex = Math.max(Math.min(upperIndex+dw, elements.size()-visibleDropout), 0);
|
||||||
|
|
||||||
drawRect(xPosition+width-3, yPosition+height+1, xPosition+width, yPosition+height+requiredHeight, Color.DARK_GRAY.getRGB());
|
drawRect(xPosition+width-3, yPosition+height+1, xPosition+width, yPosition+height+requiredHeight, Color.DARK_GRAY.getRGB());
|
||||||
|
|
||||||
float visiblePerc = ((float)visibleDropout)/elements.size();
|
float visiblePerc = ((float)visibleDropout)/elements.size();
|
||||||
int barHeight = (int)(visiblePerc*(requiredHeight-1));
|
int barHeight = (int)(visiblePerc*(requiredHeight-1));
|
||||||
|
|
||||||
float posPerc = ((float)upperIndex)/elements.size();
|
float posPerc = ((float)upperIndex)/elements.size();
|
||||||
int barY = (int)(posPerc*(requiredHeight-1));
|
int barY = (int)(posPerc*(requiredHeight-1));
|
||||||
|
|
||||||
drawRect(xPosition+width-3, yPosition+height+1+barY, xPosition+width, yPosition+height+2+barY+barHeight, -6250336);
|
drawRect(xPosition+width-3, yPosition+height+1+barY, xPosition+width, yPosition+height+2+barY+barHeight, -6250336);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,7 +114,7 @@ public class GuiDropdown extends GuiTextField {
|
|||||||
if(xPos > xPosition+width-height && xPos < xPosition+width && yPos > yPosition && yPos < yPosition+height) {
|
if(xPos > xPosition+width-height && xPos < xPosition+width && yPos > yPosition && yPos < yPosition+height) {
|
||||||
open = !open;
|
open = !open;
|
||||||
} else {
|
} else {
|
||||||
if(xPos > xPosition && xPos < xPosition+width) {
|
if(xPos > xPosition && xPos < xPosition+width && open) {
|
||||||
int requiredHeight = Math.min(maxDropoutHeight, elements.size()*dropoutElementHeight);
|
int requiredHeight = Math.min(maxDropoutHeight, elements.size()*dropoutElementHeight);
|
||||||
if(yPos > yPosition+height && yPos < yPosition+height+requiredHeight) {
|
if(yPos > yPosition+height && yPos < yPosition+height+requiredHeight) {
|
||||||
int clickedIndex = (int)Math.floor((yPos - (yPosition+height)) / dropoutElementHeight) + upperIndex;
|
int clickedIndex = (int)Math.floor((yPos - (yPosition+height)) / dropoutElementHeight) + upperIndex;
|
||||||
@@ -123,7 +126,7 @@ public class GuiDropdown extends GuiTextField {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setText(String text) {
|
public void setText(String text) {
|
||||||
if(!getText().equals(text)) {
|
if(!getText().equals(text)) {
|
||||||
@@ -141,6 +144,10 @@ public class GuiDropdown extends GuiTextField {
|
|||||||
this.elements = elements;
|
this.elements = elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearElements() {
|
||||||
|
this.elements = new ArrayList<Object>();
|
||||||
|
}
|
||||||
|
|
||||||
public void addElement(Object element) {
|
public void addElement(Object element) {
|
||||||
this.elements.add(element);
|
this.elements.add(element);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
package eu.crushedpixel.replaymod.gui.replayviewer;
|
package eu.crushedpixel.replaymod.gui.replayviewer;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
import io.netty.buffer.ByteBufInputStream;
|
|
||||||
import io.netty.buffer.Unpooled;
|
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@@ -24,7 +20,6 @@ import net.minecraft.client.gui.GuiButton;
|
|||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.gui.GuiYesNo;
|
import net.minecraft.client.gui.GuiYesNo;
|
||||||
import net.minecraft.client.gui.GuiYesNoCallback;
|
import net.minecraft.client.gui.GuiYesNoCallback;
|
||||||
import net.minecraft.client.renderer.texture.TextureUtil;
|
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.util.Util;
|
import net.minecraft.util.Util;
|
||||||
|
|
||||||
@@ -44,9 +39,9 @@ import eu.crushedpixel.replaymod.gui.online.GuiUploadFile;
|
|||||||
import eu.crushedpixel.replaymod.online.authentication.AuthenticationHandler;
|
import eu.crushedpixel.replaymod.online.authentication.AuthenticationHandler;
|
||||||
import eu.crushedpixel.replaymod.recording.ConnectionEventHandler;
|
import eu.crushedpixel.replaymod.recording.ConnectionEventHandler;
|
||||||
import eu.crushedpixel.replaymod.recording.ReplayMetaData;
|
import eu.crushedpixel.replaymod.recording.ReplayMetaData;
|
||||||
import eu.crushedpixel.replaymod.reflection.MCPNames;
|
|
||||||
import eu.crushedpixel.replaymod.replay.ReplayHandler;
|
import eu.crushedpixel.replaymod.replay.ReplayHandler;
|
||||||
import eu.crushedpixel.replaymod.utils.ImageUtils;
|
import eu.crushedpixel.replaymod.utils.ImageUtils;
|
||||||
|
import eu.crushedpixel.replaymod.utils.ReplayFileIO;
|
||||||
|
|
||||||
public class GuiReplayViewer extends GuiScreen implements GuiYesNoCallback {
|
public class GuiReplayViewer extends GuiScreen implements GuiYesNoCallback {
|
||||||
|
|
||||||
@@ -77,47 +72,42 @@ public class GuiReplayViewer extends GuiScreen implements GuiYesNoCallback {
|
|||||||
replayGuiList.clearEntries();
|
replayGuiList.clearEntries();
|
||||||
replayFileList = new ArrayList<Pair<Pair<File, ReplayMetaData>, File>>();
|
replayFileList = new ArrayList<Pair<Pair<File, ReplayMetaData>, File>>();
|
||||||
|
|
||||||
File folder = new File("./replay_recordings/");
|
for(File file : ReplayFileIO.getAllReplayFiles()) {
|
||||||
folder.mkdirs();
|
try {
|
||||||
|
ZipFile archive = new ZipFile(file);
|
||||||
|
ZipArchiveEntry recfile = archive.getEntry("recording"+ConnectionEventHandler.TEMP_FILE_EXTENSION);
|
||||||
|
ZipArchiveEntry metadata = archive.getEntry("metaData"+ConnectionEventHandler.JSON_FILE_EXTENSION);
|
||||||
|
|
||||||
for(File file : folder.listFiles()) {
|
ZipArchiveEntry image = archive.getEntry("thumb");
|
||||||
if(("."+FilenameUtils.getExtension(file.getAbsolutePath())).equals(ConnectionEventHandler.ZIP_FILE_EXTENSION)) {
|
BufferedImage img = null;
|
||||||
try {
|
if(image != null) {
|
||||||
ZipFile archive = new ZipFile(file);
|
InputStream is = archive.getInputStream(image);
|
||||||
ZipArchiveEntry recfile = archive.getEntry("recording"+ConnectionEventHandler.TEMP_FILE_EXTENSION);
|
is.skip(7);
|
||||||
ZipArchiveEntry metadata = archive.getEntry("metaData"+ConnectionEventHandler.JSON_FILE_EXTENSION);
|
BufferedImage bimg = ImageIO.read(is);
|
||||||
|
if(bimg != null) {
|
||||||
ZipArchiveEntry image = archive.getEntry("thumb");
|
img = ImageUtils.scaleImage(bimg, new Dimension(1280, 720));
|
||||||
BufferedImage img = null;
|
|
||||||
if(image != null) {
|
|
||||||
InputStream is = archive.getInputStream(image);
|
|
||||||
is.skip(7);
|
|
||||||
BufferedImage bimg = ImageIO.read(is);
|
|
||||||
if(bimg != null) {
|
|
||||||
img = ImageUtils.scaleImage(bimg, new Dimension(1280, 720));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
File tmp = null;
|
File tmp = null;
|
||||||
if(img != null) {
|
if(img != null) {
|
||||||
tmp = File.createTempFile(FilenameUtils.getBaseName(file.getAbsolutePath()), "jpg");
|
tmp = File.createTempFile(FilenameUtils.getBaseName(file.getAbsolutePath()), "jpg");
|
||||||
tmp.deleteOnExit();
|
tmp.deleteOnExit();
|
||||||
|
|
||||||
ImageIO.write(img, "jpg", tmp);
|
ImageIO.write(img, "jpg", tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStream is = archive.getInputStream(metadata);
|
InputStream is = archive.getInputStream(metadata);
|
||||||
BufferedReader br = new BufferedReader(new InputStreamReader(is));
|
BufferedReader br = new BufferedReader(new InputStreamReader(is));
|
||||||
|
|
||||||
String json = br.readLine();
|
String json = br.readLine();
|
||||||
|
|
||||||
ReplayMetaData metaData = gson.fromJson(json, ReplayMetaData.class);
|
ReplayMetaData metaData = gson.fromJson(json, ReplayMetaData.class);
|
||||||
|
|
||||||
replayFileList.add(Pair.of(Pair.of(file, metaData), tmp));
|
replayFileList.add(Pair.of(Pair.of(file, metaData), tmp));
|
||||||
|
|
||||||
archive.close();
|
archive.close();
|
||||||
} catch(Exception e) {}
|
} catch(Exception e) {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Collections.sort(replayFileList, new FileAgeComparator());
|
Collections.sort(replayFileList, new FileAgeComparator());
|
||||||
|
|||||||
@@ -1,29 +1,49 @@
|
|||||||
package eu.crushedpixel.replaymod.studio;
|
package eu.crushedpixel.replaymod.studio;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
|
||||||
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
|
||||||
import de.johni0702.replaystudio.studio.ReplayStudio;
|
import de.johni0702.replaystudio.studio.ReplayStudio;
|
||||||
import eu.crushedpixel.replaymod.gui.GuiConstants;
|
import eu.crushedpixel.replaymod.gui.GuiConstants;
|
||||||
import eu.crushedpixel.replaymod.gui.GuiDropdown;
|
import eu.crushedpixel.replaymod.gui.GuiDropdown;
|
||||||
|
import eu.crushedpixel.replaymod.utils.ReplayFileIO;
|
||||||
|
|
||||||
public class GuiReplayStudio extends GuiScreen {
|
public class GuiReplayStudio extends GuiScreen {
|
||||||
|
|
||||||
private GuiDropdown replayDropdown;
|
private GuiDropdown replayDropdown;
|
||||||
|
private GuiButton saveModeButton, saveButton;
|
||||||
private ReplayStudio studio = new ReplayStudio();
|
|
||||||
|
private boolean overrideSave = false;
|
||||||
|
|
||||||
|
private boolean initialized = false;
|
||||||
|
|
||||||
|
private List<File> replayFiles = new ArrayList<File>();
|
||||||
|
|
||||||
|
private void refreshReplayDropdown() {
|
||||||
|
replayDropdown.clearElements();
|
||||||
|
replayFiles = ReplayFileIO.getAllReplayFiles();
|
||||||
|
for(File file : replayFiles) {
|
||||||
|
String name = FilenameUtils.getBaseName(file.getAbsolutePath());
|
||||||
|
replayDropdown.addElement(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
List<GuiButton> tabButtons = new ArrayList<GuiButton>();
|
List<GuiButton> tabButtons = new ArrayList<GuiButton>();
|
||||||
|
|
||||||
tabButtons.add(new GuiButton(GuiConstants.REPLAY_EDITOR_TRIM_TAB, 0, 0, "Trim Replay"));
|
tabButtons.add(new GuiButton(GuiConstants.REPLAY_EDITOR_TRIM_TAB, 0, 0, "Trim Replay"));
|
||||||
tabButtons.add(new GuiButton(GuiConstants.REPLAY_EDITOR_CONNECT_TAB, 0, 0, "Connect Replays"));
|
tabButtons.add(new GuiButton(GuiConstants.REPLAY_EDITOR_CONNECT_TAB, 0, 0, "Connect Replays"));
|
||||||
tabButtons.add(new GuiButton(GuiConstants.REPLAY_EDITOR_MODIFY_TAB, 0, 0, "Modify Replay"));
|
tabButtons.add(new GuiButton(GuiConstants.REPLAY_EDITOR_MODIFY_TAB, 0, 0, "Modify Replay"));
|
||||||
|
|
||||||
int w = this.width - 30;
|
int w = this.width - 30;
|
||||||
int w2 = w/tabButtons.size();
|
int w2 = w/tabButtons.size();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -37,18 +57,53 @@ public class GuiReplayStudio extends GuiScreen {
|
|||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!initialized) {
|
||||||
|
replayDropdown = new GuiDropdown(1, fontRendererObj, 15+2+1+100, 60, this.width-30-8-100);
|
||||||
|
refreshReplayDropdown();
|
||||||
|
} else {
|
||||||
|
replayDropdown.width = this.width-30-8-100;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<GuiButton> saveButtons = new ArrayList<GuiButton>();
|
||||||
|
|
||||||
replayDropdown = new GuiDropdown(1, fontRendererObj, 15+2+1, 60, 100);
|
if(!initialized) {
|
||||||
replayDropdown.addElement("test1");
|
saveButtons.add(saveModeButton = new GuiButton(GuiConstants.REPLAY_EDITOR_SAVEMODE_BUTTON, 0, 0, getSaveModeLabel()));
|
||||||
replayDropdown.addElement("test2");
|
saveButtons.add(saveButton = new GuiButton(GuiConstants.REPLAY_EDITOR_SAVE_BUTTON, 0, 0, "Save Replay"));
|
||||||
replayDropdown.addElement("test3");
|
} else {
|
||||||
replayDropdown.addElement("test4");
|
saveButtons.add(saveModeButton);
|
||||||
replayDropdown.addElement("test5");
|
saveButtons.add(saveButton);
|
||||||
replayDropdown.addElement("test6");
|
}
|
||||||
replayDropdown.addElement("test7");
|
|
||||||
replayDropdown.addElement("test8");
|
w = this.width-30-100;
|
||||||
replayDropdown.addElement("test9");
|
w2 = w/saveButtons.size();
|
||||||
|
i = 0;
|
||||||
|
for(GuiButton b : saveButtons) {
|
||||||
|
int x = 15+100+(w2*i);
|
||||||
|
b.xPosition = x+2;
|
||||||
|
b.yPosition = 90;
|
||||||
|
b.width = w2-4;
|
||||||
|
|
||||||
|
buttonList.add(b);
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
initialized = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void actionPerformed(GuiButton button) throws IOException {
|
||||||
|
if(!button.enabled) return;
|
||||||
|
if(button.id == GuiConstants.REPLAY_EDITOR_SAVEMODE_BUTTON) {
|
||||||
|
overrideSave = !overrideSave;
|
||||||
|
button.displayString = getSaveModeLabel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getSaveModeLabel() {
|
||||||
|
return overrideSave ? "Replace Source File" : "Save to new File";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton)
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton)
|
||||||
@@ -56,13 +111,15 @@ public class GuiReplayStudio extends GuiScreen {
|
|||||||
replayDropdown.mouseClicked(mouseX, mouseY, mouseButton);
|
replayDropdown.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
super.mouseClicked(mouseX, mouseY, mouseButton);
|
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||||
this.drawDefaultBackground();
|
this.drawDefaultBackground();
|
||||||
this.drawCenteredString(this.fontRendererObj, "Replay Studio", this.width / 2, 10, 16777215);
|
this.drawCenteredString(this.fontRendererObj, "Replay Studio", this.width / 2, 10, 16777215);
|
||||||
|
this.drawString(fontRendererObj, "Replay File:", 30, 67, Color.WHITE.getRGB());
|
||||||
|
this.drawString(fontRendererObj, "Save Mode:", 30, 97, Color.WHITE.getRGB());
|
||||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||||
replayDropdown.drawTextBox();
|
replayDropdown.drawTextBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user