Fix create group from veh list being shown (non-functional) in group GUI.
Remove and only show in vehicle list.
This commit is contained in:
@@ -182,7 +182,8 @@ Dimension BaseVehicleListWindow::GetActionDropdownSize(bool show_autoreplace, bo
|
|||||||
* @param show_group If true include group-related stuff.
|
* @param show_group If true include group-related stuff.
|
||||||
* @return Itemlist for dropdown
|
* @return Itemlist for dropdown
|
||||||
*/
|
*/
|
||||||
DropDownList *BaseVehicleListWindow::BuildActionDropdownList(bool show_autoreplace, bool show_group, bool show_template_replace, StringID change_order_str)
|
DropDownList *BaseVehicleListWindow::BuildActionDropdownList(bool show_autoreplace, bool show_group, bool show_template_replace,
|
||||||
|
StringID change_order_str, bool show_create_group)
|
||||||
{
|
{
|
||||||
DropDownList *list = new DropDownList();
|
DropDownList *list = new DropDownList();
|
||||||
|
|
||||||
@@ -200,8 +201,9 @@ DropDownList *BaseVehicleListWindow::BuildActionDropdownList(bool show_autorepla
|
|||||||
if (change_order_str != 0) {
|
if (change_order_str != 0) {
|
||||||
*list->Append() = new DropDownListStringItem(change_order_str, ADI_CHANGE_ORDER, false);
|
*list->Append() = new DropDownListStringItem(change_order_str, ADI_CHANGE_ORDER, false);
|
||||||
}
|
}
|
||||||
|
if (show_create_group) {
|
||||||
*list->Append() = new DropDownListStringItem(STR_VEHICLE_LIST_CREATE_GROUP, ADI_CREATE_GROUP, false);
|
*list->Append() = new DropDownListStringItem(STR_VEHICLE_LIST_CREATE_GROUP, ADI_CREATE_GROUP, false);
|
||||||
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -1757,7 +1759,7 @@ public:
|
|||||||
|
|
||||||
case WID_VL_MANAGE_VEHICLES_DROPDOWN: {
|
case WID_VL_MANAGE_VEHICLES_DROPDOWN: {
|
||||||
DropDownList *list = this->BuildActionDropdownList(VehicleListIdentifier(this->window_number).type == VL_STANDARD, false,
|
DropDownList *list = this->BuildActionDropdownList(VehicleListIdentifier(this->window_number).type == VL_STANDARD, false,
|
||||||
this->vli.vtype == VEH_TRAIN, this->GetChangeOrderStringID());
|
this->vli.vtype == VEH_TRAIN, this->GetChangeOrderStringID(), true);
|
||||||
ShowDropDownList(this, list, 0, WID_VL_MANAGE_VEHICLES_DROPDOWN);
|
ShowDropDownList(this, list, 0, WID_VL_MANAGE_VEHICLES_DROPDOWN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -50,7 +50,8 @@ struct BaseVehicleListWindow : public Window {
|
|||||||
void SortVehicleList();
|
void SortVehicleList();
|
||||||
void BuildVehicleList();
|
void BuildVehicleList();
|
||||||
Dimension GetActionDropdownSize(bool show_autoreplace, bool show_group, bool show_template_replace, StringID change_order_str = 0);
|
Dimension GetActionDropdownSize(bool show_autoreplace, bool show_group, bool show_template_replace, StringID change_order_str = 0);
|
||||||
DropDownList *BuildActionDropdownList(bool show_autoreplace, bool show_group, bool show_template_replace, StringID change_order_str = 0);
|
DropDownList *BuildActionDropdownList(bool show_autoreplace, bool show_group, bool show_template_replace,
|
||||||
|
StringID change_order_str = 0, bool show_create_group = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
uint GetVehicleListHeight(VehicleType type, uint divisor = 1);
|
uint GetVehicleListHeight(VehicleType type, uint divisor = 1);
|
||||||
|
Reference in New Issue
Block a user