1 package com.irtimaled.bbor.client.gui;
3 import com.irtimaled.bbor.client.config.ColorHelper;
4 import com.irtimaled.bbor.client.config.ConfigManager;
6 public abstract class BoolButton extends AbstractButton {
9 BoolButton(int width, String label, boolean enabled) {
10 super(0, 0, width, label, enabled);
13 BoolButton(int width, String label) {
14 super(0, 0, width, label);
18 protected int getState() {
19 return enabled ? super.getState() : 0;
22 protected boolean getValue() {
26 protected void setValue(boolean value) {
31 protected void renderBackground(int mouseX, int mouseY) {
32 int left = this.x + 1;
34 int right = left + this.width - 2;
35 int bottom = top + this.height - 2;
36 if (this.getValue()) {
37 drawRectangle(left, top, right, bottom, ColorHelper.getColor(ConfigManager.buttonOnOverlay));