skill calculator: turn indicators orange for actions that will become available before target

This commit is contained in:
Adam
2018-05-27 16:36:28 -04:00
parent 4f129da698
commit 88474c102e
2 changed files with 14 additions and 0 deletions

View File

@@ -246,6 +246,7 @@ class SkillCalculator extends JPanel
slot.setText("Lvl. " + action.getLevel() + " (" + formatXPActionString(xp, actionCount, "exp) - "));
slot.setAvailable(currentLevel >= action.getLevel());
slot.setOverlapping(action.getLevel() < targetLevel);
slot.setValue((int) xp);
}
}

View File

@@ -75,6 +75,9 @@ class UIActionSlot extends JPanel
@Getter(AccessLevel.PACKAGE)
private boolean isSelected;
@Getter(AccessLevel.PACKAGE)
private boolean isOverlapping;
@Getter(AccessLevel.PACKAGE)
@Setter(AccessLevel.PACKAGE)
private int value = 0;
@@ -152,6 +155,12 @@ class UIActionSlot extends JPanel
this.updateBackground();
}
void setOverlapping(boolean overlapping)
{
isOverlapping = overlapping;
this.updateBackground();
}
void setText(String text)
{
uiLabelActions.setText(text);
@@ -163,6 +172,10 @@ class UIActionSlot extends JPanel
{
this.setBorder(GREEN_BORDER);
}
else if (isOverlapping)
{
this.setBorder(ORANGE_BORDER);
}
else
{
this.setBorder(RED_BORDER);