set new text scale @param scale scale as float 0.2-4.0
(float scale)
| 658 | * @param scale scale as float 0.2-4.0 |
| 659 | */ |
| 660 | public void setTextScale(float scale) { |
| 661 | if (scale >= 0.99 && scale <= 1.01) { |
| 662 | textScale = 1; |
| 663 | text.setFont(Main.BASE_FONT); |
| 664 | } else { |
| 665 | textScale = scale < MIN_TEXT_SCALE ? MIN_TEXT_SCALE : scale > MAX_TEXT_SCALE ? MAX_TEXT_SCALE : scale; |
| 666 | text.setFont(Main.BASE_FONT.deriveFont(Main.TEXT_SIZE * textScale)); |
| 667 | } |
| 668 | } |
| 669 | |
| 670 | /** |
| 671 | * get current color scheme |
no outgoing calls
no test coverage detected