Added setters for Position and Size variables to GuiElement interface and implemented them
This commit is contained in:
@@ -155,4 +155,16 @@ public class ComposedElement implements GuiElement {
|
||||
public int height() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void xPos(int x) {}
|
||||
|
||||
@Override
|
||||
public void yPos(int y) {}
|
||||
|
||||
@Override
|
||||
public void width(int width) {}
|
||||
|
||||
@Override
|
||||
public void height(int height) {}
|
||||
}
|
||||
|
||||
@@ -86,4 +86,24 @@ public abstract class DelegatingElement implements GuiElement {
|
||||
public int height() {
|
||||
return delegate().height();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void xPos(int x) {
|
||||
delegate().xPos(x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void yPos(int y) {
|
||||
delegate().yPos(y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void width(int width) {
|
||||
delegate().width(width);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void height(int height) {
|
||||
delegate().height(height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,4 +141,24 @@ public class GuiAdvancedButton extends GuiButton implements GuiElement {
|
||||
public int height() {
|
||||
return height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void xPos(int x) {
|
||||
xPosition = x;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void yPos(int y) {
|
||||
yPosition = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void width(int width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void height(int height) {
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,4 +109,24 @@ public class GuiAdvancedCheckBox extends GuiCheckBox implements GuiElement {
|
||||
public int height() {
|
||||
return height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void xPos(int x) {
|
||||
xPosition = x;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void yPos(int y) {
|
||||
yPosition = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void width(int width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void height(int height) {
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,4 +138,24 @@ public class GuiAdvancedTextField extends GuiTextField implements GuiElement, Gu
|
||||
public int height() {
|
||||
return height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void xPos(int x) {
|
||||
xPosition = x;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void yPos(int y) {
|
||||
yPosition = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void width(int width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void height(int height) {
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,11 @@ public interface GuiElement {
|
||||
int width();
|
||||
int height();
|
||||
|
||||
void xPos(int x);
|
||||
void yPos(int y);
|
||||
void width(int width);
|
||||
void height(int height);
|
||||
|
||||
boolean mouseClick(Minecraft mc, int mouseX, int mouseY, int button);
|
||||
void mouseDrag(Minecraft mc, int mouseX, int mouseY, int button);
|
||||
void mouseRelease(Minecraft mc, int mouseX, int mouseY, int button);
|
||||
|
||||
@@ -206,4 +206,16 @@ public class GuiScrollbar extends Gui implements GuiElement {
|
||||
public int height() {
|
||||
return SLIDER_HEIGHT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void xPos(int x) {}
|
||||
|
||||
@Override
|
||||
public void yPos(int y) {}
|
||||
|
||||
@Override
|
||||
public void width(int width) {}
|
||||
|
||||
@Override
|
||||
public void height(int height) {}
|
||||
}
|
||||
|
||||
@@ -112,4 +112,20 @@ public class GuiString extends Gui implements GuiElement {
|
||||
public int height() {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void xPos(int x) {
|
||||
positionX = x;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void yPos(int y) {
|
||||
positionY = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void width(int width) {}
|
||||
|
||||
@Override
|
||||
public void height(int height) {}
|
||||
}
|
||||
|
||||
@@ -660,4 +660,24 @@ public class GuiTextArea extends Gui implements GuiElement, GuiOutsideClickableE
|
||||
public int height() {
|
||||
return height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void xPos(int x) {
|
||||
positionX = x;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void yPos(int y) {
|
||||
positionY = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void width(int width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void height(int height) {
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,4 +359,16 @@ public class GuiTimeline extends Gui implements GuiElement {
|
||||
public int height() {
|
||||
return height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void xPos(int x) {}
|
||||
|
||||
@Override
|
||||
public void yPos(int y) {}
|
||||
|
||||
@Override
|
||||
public void width(int width) {}
|
||||
|
||||
@Override
|
||||
public void height(int height) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user