diff options
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r-- | src/group_gui.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp index a88492084..ce607c326 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -25,6 +25,7 @@ #include "vehicle_gui_base.h" #include "core/geometry_func.hpp" #include "company_base.h" +#include "company_gui.h" #include "widgets/group_widget.h" @@ -63,6 +64,8 @@ static const NWidgetPart _nested_group_widgets[] = { SetDataTip(SPR_GROUP_DELETE_TRAIN, STR_GROUP_DELETE_TOOLTIP), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_RENAME_GROUP), SetFill(0, 1), SetDataTip(SPR_GROUP_RENAME_TRAIN, STR_GROUP_RENAME_TOOLTIP), + NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_LIVERY_GROUP), SetFill(0, 1), + SetDataTip(SPR_GROUP_LIVERY_TRAIN, STR_GROUP_LIVERY_TOOLTIP), NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), EndContainer(), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_REPLACE_PROTECTION), SetFill(0, 1), SetDataTip(SPR_GROUP_REPLACE_OFF_TRAIN, STR_GROUP_REPLACE_PROTECTION_TOOLTIP), @@ -344,6 +347,7 @@ public: this->GetWidget<NWidgetCore>(WID_GL_CREATE_GROUP)->widget_data += this->vli.vtype; this->GetWidget<NWidgetCore>(WID_GL_RENAME_GROUP)->widget_data += this->vli.vtype; this->GetWidget<NWidgetCore>(WID_GL_DELETE_GROUP)->widget_data += this->vli.vtype; + this->GetWidget<NWidgetCore>(WID_GL_LIVERY_GROUP)->widget_data += this->vli.vtype; this->GetWidget<NWidgetCore>(WID_GL_REPLACE_PROTECTION)->widget_data += this->vli.vtype; this->FinishInitNested(window_number); @@ -499,6 +503,7 @@ public: this->SetWidgetsDisabledState(IsDefaultGroupID(this->vli.index) || IsAllGroupID(this->vli.index) || _local_company != this->vli.company, WID_GL_DELETE_GROUP, WID_GL_RENAME_GROUP, + WID_GL_LIVERY_GROUP, WID_GL_REPLACE_PROTECTION, WIDGET_LIST_END); @@ -696,6 +701,10 @@ public: this->ShowRenameGroupWindow(this->vli.index, false); break; + case WID_GL_LIVERY_GROUP: // Set group livery + ShowCompanyLiveryWindow(this->owner, this->vli.index); + break; + case WID_GL_AVAILABLE_VEHICLES: ShowBuildVehicleWindow(INVALID_TILE, this->vli.vtype); break; |