(int x, int y, int color, int width, int value)
| 798 | * ============== SCR_DrawField ============== |
| 799 | */ |
| 800 | private static void DrawField(int x, int y, int color, int width, int value) { |
| 801 | char ptr; |
| 802 | String num; |
| 803 | int l; |
| 804 | int frame; |
| 805 | |
| 806 | if (width < 1) |
| 807 | return; |
| 808 | |
| 809 | // draw number string |
| 810 | if (width > 5) |
| 811 | width = 5; |
| 812 | |
| 813 | AddDirtyPoint(x, y); |
| 814 | AddDirtyPoint(x + width * CHAR_WIDTH + 2, y + 23); |
| 815 | |
| 816 | num = String.valueOf(value); |
| 817 | l = num.length(); |
| 818 | if (l > width) |
| 819 | l = width; |
| 820 | x += 2 + CHAR_WIDTH * (width - l); |
| 821 | |
| 822 | ptr = num.charAt(0); |
| 823 | |
| 824 | for (int i = 0; i < l; i++) { |
| 825 | ptr = num.charAt(i); |
| 826 | if (ptr == '-') |
| 827 | frame = STAT_MINUS; |
| 828 | else |
| 829 | frame = ptr - '0'; |
| 830 | |
| 831 | ClientGlobals.re.DrawPic(x, y, sb_nums[color][frame]); |
| 832 | x += CHAR_WIDTH; |
| 833 | } |
| 834 | } |
| 835 | |
| 836 | /* |
| 837 | * =============== SCR_TouchPics |
no test coverage detected