MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SelectPlane

Method SelectPlane

src/vehicle_gui.cpp:2976–2992  ·  view source on GitHub ↗

* Display a plane in the window. * @param plane Plane to show. */

Source from the content-addressed store, hash-verified

2974 * @param plane Plane to show.
2975 */
2976 void SelectPlane(PlaneSelections plane)
2977 {
2978 switch (plane) {
2979 case SEL_DC_GOTO_DEPOT:
2980 case SEL_DC_CLONE:
2981 this->GetWidget<NWidgetStacked>(WID_VV_SELECT_DEPOT_CLONE)->SetDisplayedPlane(plane - SEL_DC_BASEPLANE);
2982 break;
2983
2984 case SEL_RT_REFIT:
2985 case SEL_RT_TURN_AROUND:
2986 this->GetWidget<NWidgetStacked>(WID_VV_SELECT_REFIT_TURN)->SetDisplayedPlane(plane - SEL_RT_BASEPLANE);
2987 break;
2988
2989 default:
2990 NOT_REACHED();
2991 }
2992 }
2993
2994public:
2995 VehicleViewWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)

Callers 2

VehicleViewWindowMethod · 0.95
UpdateButtonStatusMethod · 0.95

Calls 2

NOT_REACHEDFunction · 0.85
SetDisplayedPlaneMethod · 0.80

Tested by

no test coverage detected