src/road_gui.cpp
changeset 9143 029e126e3439
parent 9142 858a058aa730
child 9161 fda175383e87
equal deleted inserted replaced
9142:858a058aa730 9143:029e126e3439
   677 {
   677 {
   678 	if (!IsValidPlayer(_current_player)) return;
   678 	if (!IsValidPlayer(_current_player)) return;
   679 	_cur_roadtype = roadtype;
   679 	_cur_roadtype = roadtype;
   680 
   680 
   681 	DeleteWindowByClass(WC_BUILD_TOOLBAR);
   681 	DeleteWindowByClass(WC_BUILD_TOOLBAR);
   682 	Window *w = AllocateWindowDescFront(roadtype == ROADTYPE_ROAD ? &_build_road_desc : &_build_tramway_desc, TRANSPORT_ROAD);
   682 	Window *w = AllocateWindowDescFront<Window>(roadtype == ROADTYPE_ROAD ? &_build_road_desc : &_build_tramway_desc, TRANSPORT_ROAD);
   683 	if (_patches.link_terraform_toolbar) ShowTerraformToolbar(w);
   683 	if (_patches.link_terraform_toolbar) ShowTerraformToolbar(w);
   684 }
   684 }
   685 
   685 
   686 /** Widget definition of the build road toolbar in the scenario editor */
   686 /** Widget definition of the build road toolbar in the scenario editor */
   687 static const Widget _build_road_scen_widgets[] = {
   687 static const Widget _build_road_scen_widgets[] = {
   712 };
   712 };
   713 
   713 
   714 void ShowBuildRoadScenToolbar()
   714 void ShowBuildRoadScenToolbar()
   715 {
   715 {
   716 	_cur_roadtype = ROADTYPE_ROAD;
   716 	_cur_roadtype = ROADTYPE_ROAD;
   717 	AllocateWindowDescFront(&_build_road_scen_desc, 0);
   717 	AllocateWindowDescFront<Window>(&_build_road_scen_desc, 0);
   718 }
   718 }
   719 
   719 
   720 /** Enum referring to the widgets of the build road depot window */
   720 /** Enum referring to the widgets of the build road depot window */
   721 enum BuildRoadDepotWidgets {
   721 enum BuildRoadDepotWidgets {
   722 	BRDW_CLOSEBOX = 0,
   722 	BRDW_CLOSEBOX = 0,