Add Time to level to XP Globes tooltip
This commit is contained in:
@@ -283,6 +283,13 @@ public class XpGlobesOverlay extends Overlay
|
|||||||
.right(xpHrString)
|
.right(xpHrString)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String timeLeft = xpTrackerService.getTimeTillGoal(mouseOverSkill.getSkill());
|
||||||
|
xpTooltip.getChildren().add(LineComponent.builder()
|
||||||
|
.left("Time left:")
|
||||||
|
.leftColor(Color.ORANGE)
|
||||||
|
.right(timeLeft)
|
||||||
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
xpTooltip.render(graphics);
|
xpTooltip.render(graphics);
|
||||||
|
|||||||
@@ -62,4 +62,9 @@ public interface XpTrackerService
|
|||||||
* Get the amount of XP left until goal level
|
* Get the amount of XP left until goal level
|
||||||
*/
|
*/
|
||||||
int getEndGoalXp(Skill skill);
|
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();
|
return plugin.getSkillSnapshot(skill).getEndGoalXp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTimeTillGoal(Skill skill)
|
||||||
|
{
|
||||||
|
return plugin.getSkillSnapshot(skill).getTimeTillGoal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user