| 2805 | } |
| 2806 | |
| 2807 | static void TexPackOverlay_UpdateLine3(struct TexPackOverlay* s) { |
| 2808 | cc_string contents; char contentsBuffer[STRING_SIZE]; |
| 2809 | float contentLengthMB; |
| 2810 | |
| 2811 | if (s->deny) { |
| 2812 | TextWidget_SetConst(&s->lbls[3], "Sure you don't want to download the texture pack?", &s->textFont); |
| 2813 | } else if (s->contentLength) { |
| 2814 | String_InitArray(contents, contentsBuffer); |
| 2815 | contentLengthMB = s->contentLength / (1024.0f * 1024.0f); |
| 2816 | String_Format1(&contents, "Download size: %f3 MB", &contentLengthMB); |
| 2817 | TextWidget_Set(&s->lbls[3], &contents, &s->textFont); |
| 2818 | } else if (s->gotContent) { |
| 2819 | TextWidget_SetConst(&s->lbls[3], "Download size: Unknown", &s->textFont); |
| 2820 | } else { |
| 2821 | TextWidget_SetConst(&s->lbls[3], "Download size: Determining...", &s->textFont); |
| 2822 | } |
| 2823 | } |
| 2824 | |
| 2825 | static void TexPackOverlay_Update(void* screen, float delta) { |
| 2826 | struct TexPackOverlay* s = (struct TexPackOverlay*)screen; |
no test coverage detected