]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blob - src/main/java/com/irtimaled/bbor/client/gui/BoolButton.java
Change gui to use scrollable control list
[BoundingBoxOutlineReloaded.git] / src / main / java / com / irtimaled / bbor / client / gui / BoolButton.java
1 package com.irtimaled.bbor.client.gui;
2
3 public abstract class BoolButton extends AbstractButton {
4     private boolean value;
5
6     BoolButton(int width, String label, boolean enabled) {
7         super(0, 0, width, label, enabled);
8     }
9
10     BoolButton(int width, String label) {
11         super(0, 0, width, label);
12     }
13
14     @Override
15     protected int getState() {
16         return enabled ? this.getValue() ? 2 : 1 : 0;
17     }
18
19     protected boolean getValue() {
20         return this.value;
21     }
22
23     protected void setValue(boolean value) {
24         this.value = value;
25     }
26 }