aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java8
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonScreen.java2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java2
3 files changed, 6 insertions, 6 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 5a02705..8cf9d40 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
@@ -15,12 +15,12 @@ public interface BackgroundPainter {
public static BackgroundPainter VANILLA = (left, top, panel) -> {
- ScreenDrawing.drawGuiPanel(left-8, top-8, panel.getWidth()+14, panel.getHeight()+14);
+ ScreenDrawing.drawGuiPanel(left-8, top-8, panel.getWidth()+16, panel.getHeight()+16);
};
public static BackgroundPainter SLOT = (left, top, panel) -> {
if (!(panel instanceof WItemSlot)) {
- ScreenDrawing.drawBeveledPanel(left-1, top-1, panel.getWidth(), panel.getHeight(), 0xB8000000, 0x4C000000, 0xB8FFFFFF);
+ ScreenDrawing.drawBeveledPanel(left-1, top-1, panel.getWidth()+2, panel.getHeight()+2, 0xB8000000, 0x4C000000, 0xB8FFFFFF);
} else {
WItemSlot slot = (WItemSlot)panel;
for(int x = 0; x < slot.getWidth()/18; ++x) {
@@ -30,10 +30,10 @@ 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 - 4, (y * 18) + top - 4, 24, 24,
+ ScreenDrawing.drawBeveledPanel((x * 18) + left - 4, (y * 18) + top - 4, 16+8, 16+8,
lo, bg, hi);
} else {
- ScreenDrawing.drawBeveledPanel((x * 18) + left - 1, (y * 18) + top - 1, 18, 18,
+ ScreenDrawing.drawBeveledPanel((x * 18) + left - 1, (y * 18) + top - 1, 16+2, 16+2,
lo, bg, hi);
}
}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonScreen.java
index 1034779..4caa477 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonScreen.java
@@ -174,7 +174,7 @@ public class CottonScreen<T extends CottonScreenController> extends AbstractCont
}
if (this.container.getRootPanel()!=null) {
- this.container.getRootPanel().paintForeground(0, 0, mouseX, mouseY);
+ this.container.getRootPanel().paintForeground(0, 0, mouseX+left, mouseY+top);
}
}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
index 9e8c452..4287941 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
@@ -92,7 +92,7 @@ public class WItemSlot extends WWidget {
for (int y = 0; y < slotsHigh; y++) {
for (int x = 0; x < slotsWide; x++) {
- ValidatedSlot slot = new ValidatedSlot(inventory, index, this.getAbsoluteX() + (x * 18), this.getAbsoluteY() + (y * 18));
+ ValidatedSlot slot = new ValidatedSlot(inventory, index, this.getAbsoluteX() + (x * 18) + 1, this.getAbsoluteY() + (y * 18) + 1);
peers.add(slot);
c.addSlotPeer(slot);
index++;