Gigantic warning cleanup

This commit is contained in:
CrushedPixel
2015-08-31 17:46:26 +02:00
parent dd1aab16ef
commit 03aead65b6
13 changed files with 31 additions and 20 deletions

View File

@@ -379,6 +379,7 @@ public class GuiObjectManager extends GuiScreen implements GuiReplayOverlay.NoOv
}
ReplayHandler.setCustomImageObjects(objects);
}
private void updateValuesForTransformation(Transformation transformation) {

View File

@@ -22,6 +22,7 @@ public class GuiReplaySettings extends GuiScreen {
this.parentGuiScreen = parentGuiScreen;
}
@Override
public void initGui() {
this.screenTitle = I18n.format("replaymod.gui.settings.title");
@@ -107,7 +108,7 @@ public class GuiReplaySettings extends GuiScreen {
super.drawScreen(mouseX, mouseY, partialTicks);
}
@Override
protected void actionPerformed(GuiButton button) throws IOException {
if(button.enabled) {
switch(button.id) {

View File

@@ -75,7 +75,7 @@ public class ComposedElement implements GuiElement {
//if GuiOutsideClickableElement, forward mouse clicks outside of that element
if(!clicked || (part instanceof GuiOutsideClickableElement && !part.isHovering(mouseX, mouseY))) {
boolean cl = part.mouseClick(mc, mouseX, mouseY, button);
if(cl) clicked = cl;
if(cl) clicked = true;
}
}
return clicked;

View File

@@ -74,11 +74,12 @@ public class GuiTextArea extends Gui implements GuiElement, GuiOutsideClickableE
public int textColorEnabled = 0xE0E0E0;
public int textColorDisabled = 0x707070;
/*
public GuiTextArea(FontRenderer fontRenderer, int positionX, int positionY, int width, int height,
int maxTextWidth, int maxTextHeight) {
this(0, fontRenderer, positionX, positionY, width, height, maxTextWidth, maxTextHeight, -1);
}
*/
public GuiTextArea(FontRenderer fontRenderer, int positionX, int positionY, int width, int height,
int maxTextWidth, int maxTextHeight, int maxCharCount) {

View File

@@ -366,9 +366,8 @@ public class GuiReplayCenter extends GuiScreen implements GuiYesNoCallback {
if(searchServerInput.getText().trim().length() > 0) {
searchQuery.server = searchServerInput.getText().trim();
}
Boolean order = searchSortToggle.getValue() == 0;
searchQuery.order = order;
searchQuery.order = searchSortToggle.getValue() == 0;
SearchPagination searchPagination = new SearchPagination(searchQuery);
showReplaySearch(searchPagination);

View File

@@ -55,9 +55,6 @@ public class GuiReplayOverlay extends Gui {
return new GuiTexturedButton(0, x, y, size, size, replay_gui, u, v, TEXTURE_SIZE, TEXTURE_SIZE, action, I18n.format(hoverText));
}
private final int displayWidth = mc.displayWidth;
private final int displayHeight = mc.displayHeight;
private final Point screenDimensions = MouseUtils.getScaledDimensions();
private final int WIDTH = screenDimensions.getX();
private final int HEIGHT = screenDimensions.getY();

View File

@@ -25,10 +25,12 @@ public class GuiRenameReplay extends GuiScreen {
this.file = file;
}
@Override
public void updateScreen() {
this.replayNameInput.updateCursorCounter();
}
@Override
public void initGui() {
Keyboard.enableRepeatEvents(true);
@SuppressWarnings("unchecked")
@@ -42,10 +44,12 @@ public class GuiRenameReplay extends GuiScreen {
this.replayNameInput.setText(s);
}
@Override
public void onGuiClosed() {
Keyboard.enableRepeatEvents(false);
}
@Override
protected void actionPerformed(GuiButton button) throws IOException {
if(button.enabled) {
if(button.id == 1) {
@@ -70,6 +74,7 @@ public class GuiRenameReplay extends GuiScreen {
}
}
@Override
protected void keyTyped(char typedChar, int keyCode) throws IOException {
this.replayNameInput.textboxKeyTyped(typedChar, keyCode);
((GuiButton) this.buttonList.get(0)).enabled = this.replayNameInput.getText().trim().length() > 0;
@@ -79,11 +84,13 @@ public class GuiRenameReplay extends GuiScreen {
}
}
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
super.mouseClicked(mouseX, mouseY, mouseButton);
this.replayNameInput.mouseClicked(mouseX, mouseY, mouseButton);
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground();
this.drawCenteredString(this.fontRendererObj, I18n.format("replaymod.gui.viewer.rename.title"), this.width / 2, 20, 16777215);