Fix: Don't allow right-click to close world generation progress window. (#13084)
[openttd-github.git] / src / group_gui.h
blobd2fb2f71a0ed5596ecdb75f506fe0a8866389d2f
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file group_gui.h Functions/definitions that have something to do with groups. */
10 #ifndef GROUP_GUI_H
11 #define GROUP_GUI_H
13 #include "company_type.h"
14 #include "vehicle_type.h"
16 void ShowCompanyGroup(CompanyID company, VehicleType veh, GroupID group = INVALID_GROUP, bool need_existing_window = false);
17 void ShowCompanyGroupForVehicle(const Vehicle *v);
18 void DeleteGroupHighlightOfVehicle(const Vehicle *v);
20 struct GUIGroupListItem {
21 const Group *group;
22 uint8_t indent; ///< Display indentation level.
23 uint16_t level_mask; ///< Bitmask of indentation continuation.
25 constexpr GUIGroupListItem(const Group *group, int8_t indent) : group(group), indent(indent), level_mask(0) {}
28 using GUIGroupList = GUIList<GUIGroupListItem>;
30 void BuildGuiGroupList(GUIGroupList &dst, bool fold, Owner owner, VehicleType veh_type);
32 #endif /* GROUP_GUI_H */