2014-04-29 10:54:20 +10:00
|
|
|
package codechicken.nei;
|
|
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
import codechicken.lib.vec.Rectangle4i;
|
2014-04-29 10:54:20 +10:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
public abstract class Widget
|
|
|
|
|
{
|
|
|
|
|
public Widget() {
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
public abstract void draw(int mx, int my);
|
2014-04-29 10:54:20 +10:00
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
public void postDraw(int mx, int my) {
|
2014-04-29 10:54:20 +10:00
|
|
|
}
|
|
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
public boolean handleClick(int mx, int my, int button) {
|
2014-04-29 10:54:20 +10:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
public void onGuiClick(int mx, int my) {
|
2014-04-29 10:54:20 +10:00
|
|
|
}
|
|
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
public void mouseUp(int mx, int my, int button) {
|
2014-04-29 10:54:20 +10:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean handleKeyPress(int keyID, char keyChar) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void lastKeyTyped(int keyID, char keyChar) {
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
public boolean handleClickExt(int mx, int my, int button) {
|
2014-04-29 10:54:20 +10:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
public boolean onMouseWheel(int i, int mx, int my) {
|
2014-04-29 10:54:20 +10:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void update() {
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
public Rectangle4i bounds() {
|
|
|
|
|
return new Rectangle4i(x, y, w, h);
|
2014-04-29 10:54:20 +10:00
|
|
|
}
|
|
|
|
|
|
2014-06-29 20:31:37 +10:00
|
|
|
public boolean contains(int px, int py) {
|
|
|
|
|
return bounds().contains(px, py);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ItemStack getStackMouseOver(int mx, int my) {
|
2014-04-29 10:54:20 +10:00
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void mouseDragged(int mx, int my, int button, long heldTime) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<String> handleTooltip(int mx, int my, List<String> tooltip) {
|
|
|
|
|
return tooltip;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void loseFocus() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void gainFocus() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int x;
|
|
|
|
|
public int y;
|
|
|
|
|
public int z;
|
2014-06-29 20:31:37 +10:00
|
|
|
public int w;
|
|
|
|
|
public int h;
|
2014-04-29 10:54:20 +10:00
|
|
|
}
|