From 47fa6b5b808a3e0c9620aff743cfb86f54f3e14a Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Tue, 30 Apr 2024 12:41:07 +0800 Subject: [PATCH] Set this level playtime label on inter mission --- ui_build.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ui_build.c b/ui_build.c index ad1124e..531e307 100644 --- a/ui_build.c +++ b/ui_build.c @@ -81,6 +81,18 @@ void ui_EnterIntermission(System_UI *sys, const char *next_level) { // We need to update the UI elements in this State // 0 1 2 3 4 5 6 7 8 9 // "Level Time" "Record Time" + vector_Vector *parts = sys->parts[ui_InterMission]; +#define PART(i) ((ui_Part *)vector_At(parts, i)) + char buf[64]; + + // + snprintf( + buf, sizeof(buf), + "%02d:%02d.%02d", + sys->super->level_playtime.microseconds / 1000 / 1000 / 60, + sys->super->level_playtime.microseconds / 1000 / 1000 % 60, + sys->super->level_playtime.microseconds / 10000 % 100); + ui_Label_SetLabel(PART(1), buf); }