* Open the build rail toolbar window for a specific rail type. * * If the terraform toolbar is linked to the toolbar, that window is also opened. * * @param railtype Rail type to open the window for * @return newly opened rail toolbar, or nullptr if the toolbar could not be opened. */
| 921 | * @return newly opened rail toolbar, or nullptr if the toolbar could not be opened. |
| 922 | */ |
| 923 | Window *ShowBuildRailToolbar(RailType railtype) |
| 924 | { |
| 925 | if (!Company::IsValidID(_local_company)) return nullptr; |
| 926 | if (!ValParamRailType(railtype)) return nullptr; |
| 927 | |
| 928 | CloseWindowByClass(WC_BUILD_TOOLBAR); |
| 929 | _cur_railtype = railtype; |
| 930 | _remove_button_clicked = false; |
| 931 | return new BuildRailToolbarWindow(_build_rail_desc, railtype); |
| 932 | } |
| 933 | |
| 934 | /* TODO: For custom stations, respect their allowed platforms/lengths bitmasks! |
| 935 | * --pasky */ |
no test coverage detected