mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-06-27 09:29:16 +08:00
Move version indicator to status bar.
This commit is contained in:
parent
d61f910e87
commit
e635b6c188
@ -32,17 +32,6 @@ static void mainmenu_draw_top(ui_view* view, void* data, float x1, float y1, flo
|
||||
float logoX = x1 + (x2 - x1 - logoWidth) / 2;
|
||||
float logoY = y1 + (y2 - y1 - logoHeight) / 2;
|
||||
screen_draw_texture(TEXTURE_LOGO, logoX, logoY, logoWidth, logoHeight);
|
||||
|
||||
char verString[64];
|
||||
snprintf(verString, 64, "Ver. %s", VERSION_STRING);
|
||||
|
||||
float verWidth;
|
||||
float verHeight;
|
||||
screen_get_string_size(&verWidth, &verHeight, verString, 0.5f, 0.5f);
|
||||
|
||||
float verX = x1 + (x2 - x1 - verWidth) / 2;
|
||||
float verY = logoY + logoHeight + (y2 - (logoY + logoHeight) - verHeight) / 2;
|
||||
screen_draw_string(verString, verX, verY, 0.5f, 0.5f, COLOR_TEXT, false);
|
||||
}
|
||||
|
||||
static void mainmenu_update(ui_view* view, void* data, linked_list* items, list_item* selected, bool selectedTouched) {
|
||||
|
@ -106,6 +106,14 @@ static void ui_draw_top(ui_view* ui) {
|
||||
screen_draw_texture(TEXTURE_TOP_SCREEN_BOTTOM_BAR, topScreenBottomBarX, topScreenBottomBarY, topScreenBottomBarWidth, topScreenBottomBarHeight);
|
||||
screen_draw_texture(TEXTURE_TOP_SCREEN_BOTTOM_BAR_SHADOW, topScreenBottomBarX, topScreenBottomBarY - topScreenBottomBarShadowHeight, topScreenBottomBarShadowWidth, topScreenBottomBarShadowHeight);
|
||||
|
||||
char verText[64];
|
||||
snprintf(verText, 64, "Ver. %s", VERSION_STRING);
|
||||
|
||||
float verWidth;
|
||||
float verHeight;
|
||||
screen_get_string_size(&verWidth, &verHeight, verText, 0.5f, 0.5f);
|
||||
screen_draw_string(verText, topScreenTopBarX + 2, topScreenTopBarY + (topScreenTopBarHeight - verHeight) / 2, 0.5f, 0.5f, COLOR_TEXT, false);
|
||||
|
||||
time_t t = time(NULL);
|
||||
char* timeText = ctime(&t);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user