Hiding puck detection errors from users.
This commit is contained in:
@@ -87,13 +87,24 @@ public class PuckGraphics {
|
||||
public boolean isHighlithted() {
|
||||
return puck.isSelected() || puck.isSegmentSelected();
|
||||
}
|
||||
|
||||
|
||||
Color getEmptyColor(){
|
||||
return isHighlithted() ? new Color(212, 212, 212) : Color.LIGHT_GRAY;
|
||||
}
|
||||
|
||||
Color getErrorColor(){
|
||||
if (puck.getDisplayDetectionError()){
|
||||
return isHighlithted() ? new Color(192, 10, 10) : new Color(192, 128, 128);
|
||||
}
|
||||
return getEmptyColor();
|
||||
}
|
||||
|
||||
Color getColor() {
|
||||
Color ret = Color.LIGHT_GRAY;
|
||||
switch (puck.detection) {
|
||||
case Empty:
|
||||
//ret = isHighlithted() ? new Color(224, 224, 224) : Color.LIGHT_GRAY;
|
||||
ret = isHighlithted() ? new Color(212, 212, 212) : Color.LIGHT_GRAY;
|
||||
ret = getEmptyColor();
|
||||
break;
|
||||
case Present:
|
||||
if ((puck.puckType != null) && (puck.puckType != PuckType.Unknown)){
|
||||
@@ -106,15 +117,15 @@ public class PuckGraphics {
|
||||
break;
|
||||
case Empty:
|
||||
case Error:
|
||||
ret = isHighlithted() ? new Color(192, 10, 10) : new Color(192, 128, 128);
|
||||
ret = getErrorColor();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ret = isHighlithted() ? new Color(0, 140, 140) : new Color(128, 192, 192);
|
||||
}
|
||||
break;
|
||||
case Error:
|
||||
ret = isHighlithted() ? new Color(192, 10, 10) : new Color(192, 128, 128);
|
||||
case Error:
|
||||
ret = getErrorColor();
|
||||
break;
|
||||
case Offline:
|
||||
ret = isHighlithted() ? new Color(250, 255, 48) : new Color(253, 194, 41);
|
||||
|
||||
Reference in New Issue
Block a user