Merge pull request #85 from ShaunDreclin/xp-globes-ttl
Add Time to level to XP Globes tooltip
This commit is contained in:
@@ -292,6 +292,13 @@ public class XpGlobesOverlay extends Overlay
|
||||
.right(xpHrString)
|
||||
.build());
|
||||
}
|
||||
|
||||
String timeLeft = xpTrackerService.getTimeTillGoal(mouseOverSkill.getSkill());
|
||||
xpTooltip.getChildren().add(LineComponent.builder()
|
||||
.left("Time left:")
|
||||
.leftColor(Color.ORANGE)
|
||||
.right(timeLeft)
|
||||
.build());
|
||||
}
|
||||
|
||||
xpTooltip.render(graphics);
|
||||
|
||||
@@ -62,4 +62,9 @@ public interface XpTrackerService
|
||||
* Get the amount of XP left until goal level
|
||||
*/
|
||||
int getEndGoalXp(Skill skill);
|
||||
|
||||
/**
|
||||
* Get the amount of time left until goal level
|
||||
*/
|
||||
String getTimeTillGoal(Skill skill);
|
||||
}
|
||||
|
||||
@@ -80,4 +80,10 @@ class XpTrackerServiceImpl implements XpTrackerService
|
||||
{
|
||||
return plugin.getSkillSnapshot(skill).getEndGoalXp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTimeTillGoal(Skill skill)
|
||||
{
|
||||
return plugin.getSkillSnapshot(skill).getTimeTillGoal();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user