1 package com.irtimaled.bbor.client.gui;
3 import com.irtimaled.bbor.client.config.ColorHelper;
4 import com.irtimaled.bbor.client.config.ConfigManager;
5 import net.minecraft.client.util.math.MatrixStack;
7 public abstract class BoolButton extends AbstractButton {
8 BoolButton(int width, String label, boolean enabled) {
9 super(width, label, enabled);
12 BoolButton(int width, String label) {
13 super(0, 0, width, label);
16 protected abstract boolean getValue();
19 protected void renderBackground(MatrixStack matrixStack, int mouseX, int mouseY) {
20 int left = this.x + 1;
22 int right = left + this.width - 2;
23 int bottom = top + this.height - 2;
24 if (this.getValue()) {
25 drawRectangle(matrixStack, left, top, right, bottom, ColorHelper.getColor(ConfigManager.buttonOnOverlay));