]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blobdiff - src/main/java/com/irtimaled/bbor/client/gui/BoundingBoxTypeButton.java
Allow colors to be configured
[BoundingBoxOutlineReloaded.git] / src / main / java / com / irtimaled / bbor / client / gui / BoundingBoxTypeButton.java
index 7432bf227f0d7733d07a51176fb7af59133da437..8b08dd4462d2aa65bcfc24652d72a31fed907907 100644 (file)
@@ -6,11 +6,11 @@ import com.irtimaled.bbor.common.BoundingBoxType;
 import java.awt.*;
 
 public class BoundingBoxTypeButton extends BoolSettingButton {
-    private final Color color;
+    private final BoundingBoxType type;
 
     BoundingBoxTypeButton(int width, String label, BoundingBoxType type) {
         super(width, label, BoundingBoxTypeHelper.renderSetting(type));
-        color = type.getColor();
+        this.type = type;
     }
 
     @Override
@@ -22,6 +22,8 @@ public class BoundingBoxTypeButton extends BoolSettingButton {
         int right = left + width - 2;
         int bottom = top + height - 2;
 
+        Color color = BoundingBoxTypeHelper.getColor(type);
+
         // top & left
         drawRectangle(left, top, right, top + 1, color);
         drawRectangle(left, top, left + 1, bottom, color);