GUI for the group window. More...
#include "stdafx.h"#include "textbuf_gui.h"#include "command_func.h"#include "vehicle_gui.h"#include "vehicle_base.h"#include "string_func.h"#include "strings_func.h"#include "window_func.h"#include "vehicle_func.h"#include "autoreplace_gui.h"#include "company_func.h"#include "widgets/dropdown_func.h"#include "tilehighlight_func.h"#include "vehicle_gui_base.h"#include "core/geometry_func.hpp"#include "company_base.h"#include "widgets/group_widget.h"#include "table/sprites.h"Go to the source code of this file.
Data Structures | |
| class | VehicleGroupWindow |
Typedefs | |
| typedef GUIList< const Group * > | GUIGroupList |
Functions | |
| void | ShowCompanyGroup (CompanyID company, VehicleType vehicle_type) |
| Show the group window for the given company and vehicle type. | |
| static VehicleGroupWindow * | FindVehicleGroupWindow (VehicleType vt, Owner owner) |
| Finds a group list window determined by vehicle type and owner. | |
| void | CcCreateGroup (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) |
| Opens a 'Rename group' window for newly created group. | |
| void | DeleteGroupHighlightOfVehicle (const Vehicle *v) |
| Removes the highlight of a vehicle in a group window. | |
Variables | |
| static const NWidgetPart | _nested_group_widgets [] |
| static WindowDesc | _other_group_desc (WDP_AUTO, 460, 246, WC_INVALID, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_group_widgets, lengthof(_nested_group_widgets)) |
| static const WindowDesc | _train_group_desc (WDP_AUTO, 525, 246, WC_TRAINS_LIST, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_group_widgets, lengthof(_nested_group_widgets)) |
GUI for the group window.
Definition in file group_gui.cpp.
| void CcCreateGroup | ( | const CommandCost & | result, | |
| TileIndex | tile, | |||
| uint32 | p1, | |||
| uint32 | p2 | |||
| ) |
Opens a 'Rename group' window for newly created group.
| success | did command succeed? | |
| tile | unused | |
| p1 | vehicle type | |
| p2 | unused |
Definition at line 796 of file group_gui.cpp.
References _current_company, CommandCost::Failed(), FindVehicleGroupWindow(), and VEH_AIRCRAFT.
Referenced by VehicleGroupWindow::OnClick().
| void DeleteGroupHighlightOfVehicle | ( | const Vehicle * | v | ) |
Removes the highlight of a vehicle in a group window.
| *v | Vehicle to remove all highlights from |
Definition at line 809 of file group_gui.cpp.
References _special_mouse_mode, FindVehicleGroupWindow(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, Vehicle::owner, BaseVehicle::type, VehicleGroupWindow::UnselectVehicle(), and WSM_DRAGDROP.
Referenced by Vehicle::PreDestructor().
| static VehicleGroupWindow* FindVehicleGroupWindow | ( | VehicleType | vt, | |
| Owner | owner | |||
| ) | [inline, static] |
Finds a group list window determined by vehicle type and owner.
| vt | vehicle type | |
| owner | owner of groups |
Definition at line 783 of file group_gui.cpp.
References FindWindowById(), and GetWindowClassForVehicleType().
Referenced by CcCreateGroup(), and DeleteGroupHighlightOfVehicle().
| void ShowCompanyGroup | ( | CompanyID | company, | |
| VehicleType | vehicle_type | |||
| ) |
Show the group window for the given company and vehicle type.
| company | The company to show the window for. | |
| vehicle_type | The type of vehicle to show it for. |
Definition at line 764 of file group_gui.cpp.
References WindowDesc::cls, GetWindowClassForVehicleType(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), and VEH_TRAIN.
1.7.1