Made GuiDropdown a subclass of GuiAdvancedTextfield, updating the Constructor and removing the now redundant GuiConstants entries

This commit is contained in:
CrushedPixel
2015-07-08 15:50:12 +02:00
parent e26e09a264
commit 80a47a61c8
6 changed files with 8 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class GuiDropdown<T> extends GuiTextField {
public class GuiDropdown<T> extends GuiAdvancedTextField {
private final int visibleDropout;
private final int dropoutElementHeight = 14;
@@ -28,9 +28,9 @@ public class GuiDropdown<T> extends GuiTextField {
private List<T> elements = new ArrayList<T>();
private HashMap<Integer, String> hoverTexts = new HashMap<Integer, String>();
public GuiDropdown(int id, FontRenderer fontRenderer,
public GuiDropdown(FontRenderer fontRenderer,
int xPos, int yPos, int width, int visibleDropout) {
super(id, fontRenderer, xPos, yPos, width, 20);
super(fontRenderer, xPos, yPos, width, 20);
this.visibleDropout = visibleDropout;
this.maxDropoutHeight = dropoutElementHeight * visibleDropout;
}