diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 600666e3d7..fe105d6c2a 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -138,7 +138,7 @@ static uint GetTotalCategoriesHeight() */ static uint GetMaxCategoriesWidth() { - uint max_width = 0; + uint max_width = GetStringBoundingBox(STR_FINANCES_YEAR_CAPTION).width; /* Loop through categories to check max widths. */ for (const ExpensesList &list : _expenses_list_types) { @@ -173,8 +173,10 @@ static void DrawCategory(const Rect &r, int start_y, const ExpensesList &list) */ static void DrawCategories(const Rect &r) { - /* Start with an empty space in the year row, plus the blockspace under the year. */ - int y = r.top + GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_wide; + int y = r.top; + /* Draw description of 12-minute economic period. */ + DrawString(r.left, r.right, y, (STR_FINANCES_YEAR_CAPTION), TC_FROMSTRING, SA_LEFT, true); + y += GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_wide; for (const ExpensesList &list : _expenses_list_types) { /* Draw category title and advance y */ diff --git a/src/lang/english.txt b/src/lang/english.txt index 98a21d8c66..21a9f540b9 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -3771,6 +3771,7 @@ STR_EDIT_WAYPOINT_NAME :{WHITE}Edit way # Finances window STR_FINANCES_CAPTION :{WHITE}{COMPANY} Finances {BLACK}{COMPANY_NUM} STR_FINANCES_YEAR :{WHITE}{NUM} +STR_FINANCES_YEAR_CAPTION :{WHITE}{TKM Year Period} ###length 3 STR_FINANCES_REVENUE_TITLE :{WHITE}Revenue