1
mirror of https://github.com/Shiewk/Widgets.git synced 2026-04-28 11:34:17 +02:00

Add slight borders around widgets on config screen

This commit is contained in:
Shy
2025-11-23 17:09:12 +01:00
parent e2b6ea309c
commit 2c51b05b22
@@ -29,7 +29,8 @@ public class WidgetWidget extends ClickableWidget {
COLOR_DISABLED = new Color(200, 0, 0, 200).getRGB(),
COLOR_DISABLED_HOVER = new Color(255, 0, 0, 200).getRGB(),
COLOR_ENABLED = new Color(0, 200, 0, 200).getRGB(),
COLOR_ENABLED_HOVER = new Color(0, 255, 0, 200).getRGB();
COLOR_ENABLED_HOVER = new Color(0, 255, 0, 200).getRGB(),
COLOR_BORDER = 0x80_ff_ff_ff;
private final MinecraftClient client;
private final ModWidget widget;
@@ -71,6 +72,11 @@ public class WidgetWidget extends ClickableWidget {
if (hover || isMouseOverToggle(mouseX, mouseY)){
context.setCursor(StandardCursors.POINTING_HAND);
}
context.drawHorizontalLine(getX(), getX() + getWidth() - 1, getY(), COLOR_BORDER);
context.drawHorizontalLine(getX() + 1, getX() + getWidth() - 1, getY() + getHeight() - 1, COLOR_BORDER);
context.drawVerticalLine(getX(), getY(), getY() + getHeight(), COLOR_BORDER);
context.drawVerticalLine(getX() + getWidth() - 1, getY(), getY() + getHeight() - 1, COLOR_BORDER);
}
@Override