Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private TextColor getHealthColor(int percent) {
- TextColor highlightColor;
- switch (percent) {
- case 1:
- case 2:
- highlightColor = TextColors.DARK_RED;
- break;
- case 3:
- case 4:
- highlightColor = TextColors.RED;
- break;
- case 5:
- highlightColor = TextColors.GOLD;
- break;
- case 6:
- highlightColor = TextColors.YELLOW;
- break;
- case 7:
- case 8:
- highlightColor = TextColors.GREEN;
- break;
- case 9:
- case 10:
- default:
- highlightColor = TextColors.DARK_GREEN;
- break;
- }
- return highlightColor;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement