Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. private TextColor getHealthColor(int percent) {
  2. TextColor highlightColor;
  3. switch (percent) {
  4. case 1:
  5. case 2:
  6. highlightColor = TextColors.DARK_RED;
  7. break;
  8. case 3:
  9. case 4:
  10. highlightColor = TextColors.RED;
  11. break;
  12. case 5:
  13. highlightColor = TextColors.GOLD;
  14. break;
  15. case 6:
  16. highlightColor = TextColors.YELLOW;
  17. break;
  18. case 7:
  19. case 8:
  20. highlightColor = TextColors.GREEN;
  21. break;
  22. case 9:
  23. case 10:
  24. default:
  25. highlightColor = TextColors.DARK_GREEN;
  26. break;
  27. }
  28.  
  29. return highlightColor;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement