diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-08-03 01:30:42 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-08-03 01:30:42 +0300 |
commit | 725d6122ab72c705fe4ff13597f723ce4af34d41 (patch) | |
tree | 3605bdfa7d830f87e0a5ff003ad90e9de70a8c03 /src/main/java/io | |
parent | db467566dcb1341396d629b5ad6fefc8307e221c (diff) | |
download | LibGui-725d6122ab72c705fe4ff13597f723ce4af34d41.tar.gz LibGui-725d6122ab72c705fe4ff13597f723ce4af34d41.tar.bz2 LibGui-725d6122ab72c705fe4ff13597f723ce4af34d41.zip |
Fix centering issues with button icons and big item slots
Closes #77.
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java | 2 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java b/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java index f95d816..4789271 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java @@ -53,7 +53,7 @@ public interface BackgroundPainter { //this will cause a slightly discolored bottom border on vanilla backgrounds but it's necessary for color support, it shouldn't be *too* visible unless you're looking for it int hi = 0xB8FFFFFF; if (slot.isBigSlot()) { - ScreenDrawing.drawBeveledPanel((x * 18) + left - 3, (y * 18) + top - 3, 26, 26, + ScreenDrawing.drawBeveledPanel((x * 18) + left - 4, (y * 18) + top - 4, 26, 26, lo, bg, hi); if (slot.getFocusedSlot() == index) { int sx = (x * 18) + left - 3; diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java index 40a7097..719f88e 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java @@ -94,7 +94,7 @@ public class WButton extends WWidget { ScreenDrawing.texturedRect(x+(getWidth()/2), y, getWidth()/2, 20, AbstractButtonWidget.WIDGETS_LOCATION, buttonEndLeft, buttonTop, 200*px, buttonTop+buttonHeight, 0xFFFFFFFF); if (icon != null) { - icon.paint(matrices, x + 2, y + 2, 16); + icon.paint(matrices, x + 1, y + 1, 16); } if (label!=null) { |