skillcalculator: Add needed experience tooltip
This adds a tooltip to the "Target Experience" field indicating the amount of experience needed to reach that target.
This commit is contained in:
committed by
Jordan Atwood
parent
bb6c2d6381
commit
81427bfd94
@@ -369,10 +369,12 @@ class SkillCalculator extends JPanel
|
|||||||
|
|
||||||
final String cXP = String.format("%,d", currentXP);
|
final String cXP = String.format("%,d", currentXP);
|
||||||
final String tXP = String.format("%,d", targetXP);
|
final String tXP = String.format("%,d", targetXP);
|
||||||
|
final String nXP = String.format("%,d", targetXP - currentXP);
|
||||||
uiInput.setCurrentLevelInput(currentLevel);
|
uiInput.setCurrentLevelInput(currentLevel);
|
||||||
uiInput.setCurrentXPInput(cXP);
|
uiInput.setCurrentXPInput(cXP);
|
||||||
uiInput.setTargetLevelInput(targetLevel);
|
uiInput.setTargetLevelInput(targetLevel);
|
||||||
uiInput.setTargetXPInput(tXP);
|
uiInput.setTargetXPInput(tXP);
|
||||||
|
uiInput.setNeededXP(nXP + " XP required to reach target XP");
|
||||||
calculate();
|
calculate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,11 @@ class UICalculatorInputArea extends JPanel
|
|||||||
setInput(uiFieldTargetXP, value);
|
setInput(uiFieldTargetXP, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setNeededXP(Object value)
|
||||||
|
{
|
||||||
|
uiFieldTargetXP.setToolTipText((String) value);
|
||||||
|
}
|
||||||
|
|
||||||
private int getInput(JTextField field)
|
private int getInput(JTextField field)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user