diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-03-19 04:30:52 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-03-19 04:30:52 +0800 |
| commit | 1f6fc41eaebc3c565bef12606ff98a076fc32e89 (patch) | |
| tree | 33a5c1cd135f6c5ecd8b85fd602bd8c290cf9fb7 /src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java | |
| parent | 1764648e4f536b2e6ac1b7d1cb3c3fb60e206b29 (diff) | |
| download | RoughlyEnoughItems-1f6fc41eaebc3c565bef12606ff98a076fc32e89.tar.gz RoughlyEnoughItems-1f6fc41eaebc3c565bef12606ff98a076fc32e89.tar.bz2 RoughlyEnoughItems-1f6fc41eaebc3c565bef12606ff98a076fc32e89.zip | |
20w12a
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java index 9a835af9a..c16b071c8 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java @@ -132,19 +132,19 @@ public abstract class ButtonWidget extends WidgetWithBounds { RenderSystem.blendFuncSeparate(770, 771, 1, 0); RenderSystem.blendFunc(770, 771); //Four Corners - blit(x, y, getZOffset(), 0, textureOffset * 80, 4, 4, 512, 256); - blit(x + width - 4, y, getZOffset(), 252, textureOffset * 80, 4, 4, 512, 256); - blit(x, y + height - 4, getZOffset(), 0, textureOffset * 80 + 76, 4, 4, 512, 256); - blit(x + width - 4, y + height - 4, getZOffset(), 252, textureOffset * 80 + 76, 4, 4, 512, 256); + drawTexture(x, y, getZOffset(), 0, textureOffset * 80, 4, 4, 512, 256); + drawTexture(x + width - 4, y, getZOffset(), 252, textureOffset * 80, 4, 4, 512, 256); + drawTexture(x, y + height - 4, getZOffset(), 0, textureOffset * 80 + 76, 4, 4, 512, 256); + drawTexture(x + width - 4, y + height - 4, getZOffset(), 252, textureOffset * 80 + 76, 4, 4, 512, 256); //Sides - blit(x + 4, y, getZOffset(), 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); - blit(x + 4, y + height - 4, getZOffset(), 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); - blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4, 512, 256); - blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4, y, getZOffset(), 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4, y + height - 4, getZOffset(), 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4 + MathHelper.ceil((width - 8) / 2f), y, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4, 512, 256); for (int i = y + 4; i < y + height - 4; i += 76) { - blit(x, i, getZOffset(), 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); - blit(x + MathHelper.ceil(width / 2f), i, getZOffset(), 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); + drawTexture(x, i, getZOffset(), 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); + drawTexture(x + MathHelper.ceil(width / 2f), i, getZOffset(), 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); } } |
