MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / TexPackOverlay_UpdateLine3

Function TexPackOverlay_UpdateLine3

src/Menus.c:2807–2823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2805}
2806
2807static 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
2825static void TexPackOverlay_Update(void* screen, float delta) {
2826 struct TexPackOverlay* s = (struct TexPackOverlay*)screen;

Callers 2

TexPackOverlay_UpdateFunction · 0.85

Calls 3

TextWidget_SetConstFunction · 0.85
String_Format1Function · 0.85
TextWidget_SetFunction · 0.85

Tested by

no test coverage detected