diff --git a/common/common.h b/common/common.h index 1ebd67d..ad60bd2 100644 --- a/common/common.h +++ b/common/common.h @@ -88,6 +88,7 @@ typedef enum ThemeLayoutId_MenuActiveEntryName, ThemeLayoutId_MenuActiveEntryAuthor, ThemeLayoutId_MenuActiveEntryVersion, + ThemeLayoutId_SystemVersion, ThemeLayoutId_Total, } ThemeLayoutId; diff --git a/common/menu.c b/common/menu.c index 5bdb82a..de53138 100644 --- a/common/menu.c +++ b/common/menu.c @@ -565,6 +565,13 @@ void drawNetwork(int tmpX, AssetId id) { if (layoutobj->visible) drawIcon(layoutobj->posType ? tmpX + layoutobj->posStart[0] : layoutobj->posStart[0], layoutobj->posStart[1], data->imageSize[0], data->imageSize[1], data->buffer, themeCurrent.textColor); } +void drawSystemVersion(){ + char tmpstr[32]; + u32 currentVersion = hosversionGet(); + snprintf(tmpstr, sizeof(tmpstr)-1, "System v%d.%d.%d", HOSVER_MAJOR(currentVersion), HOSVER_MINOR(currentVersion), HOSVER_MICRO(currentVersion)); + DrawTextFromLayout(ThemeLayoutId_SystemVersion, themeCurrent.textColor, tmpstr); +} + u32 drawStatus() { bool netstatusFlag=0; bool temperatureFlag=0; @@ -598,6 +605,8 @@ u32 drawStatus() { } } + drawSystemVersion(); + return tmpX; } diff --git a/common/theme.c b/common/theme.c index c37dacf..26b5264 100644 --- a/common/theme.c +++ b/common/theme.c @@ -404,6 +404,13 @@ void themeStartup(ThemePreset preset) { .posStart = {1280 - 790, 135+10 + 28 + 30 + 18 + 6 + 18}, .font = interuiregular14, }, + + [ThemeLayoutId_SystemVersion] = { + .visible = true, + .posType = false, + .posStart = {40 + 2, 0 + 47 + 10 + 21 + 8}, + .font = interuiregular14, + }, }, };