aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/gui/widget/Control.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2018-12-30 20:10:36 +0800
committerUnknown <shekwancheung0528@gmail.com>2018-12-30 20:10:36 +0800
commit3e1f4333a51513b440b32adfe9b698590fbf76f5 (patch)
treecf337b4e12df85cd30d25721bab6c1ba1f4591f8 /src/main/java/me/shedaniel/gui/widget/Control.java
parent814e2e94ad643f04576ab0569c4b94f96b275f51 (diff)
downloadRoughlyEnoughItems-3e1f4333a51513b440b32adfe9b698590fbf76f5.tar.gz
RoughlyEnoughItems-3e1f4333a51513b440b32adfe9b698590fbf76f5.tar.bz2
RoughlyEnoughItems-3e1f4333a51513b440b32adfe9b698590fbf76f5.zip
Better stuff
Diffstat (limited to 'src/main/java/me/shedaniel/gui/widget/Control.java')
-rwxr-xr-xsrc/main/java/me/shedaniel/gui/widget/Control.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/me/shedaniel/gui/widget/Control.java b/src/main/java/me/shedaniel/gui/widget/Control.java
index 32763caa6..dd674e605 100755
--- a/src/main/java/me/shedaniel/gui/widget/Control.java
+++ b/src/main/java/me/shedaniel/gui/widget/Control.java
@@ -91,6 +91,25 @@ public abstract class Control extends Drawable {
lvt_9_1_.draw();
}
+ protected void drawTexturedModalRect(int x, int y, int u, int v, int width, int height, float zLevel) {
+ float lvt_7_1_ = 0.00390625F;
+ float lvt_8_1_ = 0.00390625F;
+ Tessellator lvt_9_1_ = Tessellator.getInstance();
+ BufferBuilder lvt_10_1_ = lvt_9_1_.getBuffer();
+ lvt_10_1_.begin(7, DefaultVertexFormats.POSITION_TEX);
+ lvt_10_1_.pos((double) (x + 0), (double) (y + height), zLevel).tex((double) ((float) (u + 0) * 0.00390625F), (double) ((float) (v + height) * 0.00390625F)).endVertex();
+ lvt_10_1_.pos((double) (x + width), (double) (y + height), zLevel).tex((double) ((float) (u + width) * 0.00390625F), (double) ((float) (v + height) * 0.00390625F)).endVertex();
+ lvt_10_1_.pos((double) (x + width), (double) (y + 0), zLevel).tex((double) ((float) (u + width) * 0.00390625F), (double) ((float) (v + 0) * 0.00390625F)).endVertex();
+ lvt_10_1_.pos((double) (x + 0), (double) (y + 0), zLevel).tex((double) ((float) (u + 0) * 0.00390625F), (double) ((float) (v + 0) * 0.00390625F)).endVertex();
+ lvt_9_1_.draw();
+ }
+
+
public void tick() {
}
+
+ public void setOnClick(IntFunction<Boolean> onClick) {
+ this.onClick = onClick;
+ }
+
}