summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/company_gui.cpp35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index e7bba8111..bfcda0e6d 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -2173,12 +2173,12 @@ static const NWidgetPart _nested_company_widgets[] = {
EndContainer(),
NWidget(NWID_VERTICAL), SetPIP(4, 2, 4),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_C_SELECT_VIEW_BUILD_HQ),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_C_VIEW_HQ), SetFill(1, 0), SetDataTip(STR_COMPANY_VIEW_VIEW_HQ_BUTTON, STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_C_BUILD_HQ), SetFill(1, 0), SetDataTip(STR_COMPANY_VIEW_BUILD_HQ_BUTTON, STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_C_VIEW_HQ), SetDataTip(STR_COMPANY_VIEW_VIEW_HQ_BUTTON, STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP),
+ NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_C_BUILD_HQ), SetDataTip(STR_COMPANY_VIEW_BUILD_HQ_BUTTON, STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP),
EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_C_SELECT_RELOCATE),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_C_RELOCATE_HQ), SetFill(1, 0), SetDataTip(STR_COMPANY_VIEW_RELOCATE_HQ, STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS),
- NWidget(NWID_SPACER), SetMinimalSize(90, 0),
+ NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_C_RELOCATE_HQ), SetDataTip(STR_COMPANY_VIEW_RELOCATE_HQ, STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS),
+ NWidget(NWID_SPACER),
EndContainer(),
NWidget(NWID_SPACER), SetFill(0, 1),
EndContainer(),
@@ -2193,7 +2193,7 @@ static const NWidgetPart _nested_company_widgets[] = {
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_C_DESC_INFRASTRUCTURE_COUNTS), SetMinimalTextLines(5, 0), SetFill(1, 0),
NWidget(NWID_VERTICAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_C_VIEW_INFRASTRUCTURE), SetDataTip(STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON, STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP),
- NWidget(NWID_SPACER), SetFill(0, 1), SetMinimalSize(90, 0),
+ NWidget(NWID_SPACER),
EndContainer(),
EndContainer(),
EndContainer(),
@@ -2204,14 +2204,14 @@ static const NWidgetPart _nested_company_widgets[] = {
NWidget(NWID_SPACER), SetFill(0, 1),
EndContainer(),
EndContainer(),
+ /* Multi player buttons. */
NWidget(NWID_VERTICAL), SetPIP(4, 2, 4),
- NWidget(NWID_SPACER), SetMinimalSize(90, 0), SetFill(0, 1),
- /* Multi player buttons. */
- NWidget(NWID_HORIZONTAL),
+ NWidget(NWID_SPACER), SetFill(0, 1),
+ NWidget(NWID_HORIZONTAL), SetPIP(0, 4, 0),
NWidget(WWT_EMPTY, COLOUR_GREY, WID_C_HAS_PASSWORD),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_C_SELECT_MULTIPLAYER),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_C_COMPANY_PASSWORD), SetFill(1, 0), SetDataTip(STR_COMPANY_VIEW_PASSWORD, STR_COMPANY_VIEW_PASSWORD_TOOLTIP),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_C_COMPANY_JOIN), SetFill(1, 0), SetDataTip(STR_COMPANY_VIEW_JOIN, STR_COMPANY_VIEW_JOIN_TOOLTIP),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_C_COMPANY_PASSWORD), SetDataTip(STR_COMPANY_VIEW_PASSWORD, STR_COMPANY_VIEW_PASSWORD_TOOLTIP),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_C_COMPANY_JOIN), SetDataTip(STR_COMPANY_VIEW_JOIN, STR_COMPANY_VIEW_JOIN_TOOLTIP),
EndContainer(),
EndContainer(),
EndContainer(),
@@ -2398,6 +2398,21 @@ struct CompanyWindow : Window
break;
}
+ case WID_C_VIEW_HQ:
+ case WID_C_BUILD_HQ:
+ case WID_C_RELOCATE_HQ:
+ case WID_C_VIEW_INFRASTRUCTURE:
+ case WID_C_COMPANY_PASSWORD:
+ case WID_C_COMPANY_JOIN:
+ size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_VIEW_HQ_BUTTON).width);
+ size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_BUILD_HQ_BUTTON).width);
+ size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_RELOCATE_HQ).width);
+ size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON).width);
+ size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_PASSWORD).width);
+ size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_JOIN).width);
+ break;
+
+
case WID_C_HAS_PASSWORD:
*size = maxdim(*size, GetSpriteSize(SPR_LOCK));
break;