src/bridge_gui.cpp
changeset 10461 48556aee54da
parent 10433 cca9f7948fe5
child 10595 7957c71b0dfe
equal deleted inserted replaced
10460:a834c2e45ae1 10461:48556aee54da
   182 
   182 
   183 		_bridgedata.count = j;
   183 		_bridgedata.count = j;
   184 	}
   184 	}
   185 
   185 
   186 	if (j != 0) {
   186 	if (j != 0) {
   187 		Window *w = AllocateWindowDesc(&_build_bridge_desc);
   187 		Window *w = new Window(&_build_bridge_desc);
   188 		/* Change the data, or the caption of the gui. Set it to road or rail, accordingly */
   188 		/* Change the data, or the caption of the gui. Set it to road or rail, accordingly */
   189 		w->widget[BBSW_CAPTION].data = (transport_type == TRANSPORT_ROAD) ? STR_1803_SELECT_ROAD_BRIDGE : STR_100D_SELECT_RAIL_BRIDGE;
   189 		w->widget[BBSW_CAPTION].data = (transport_type == TRANSPORT_ROAD) ? STR_1803_SELECT_ROAD_BRIDGE : STR_100D_SELECT_RAIL_BRIDGE;
   190 	} else {
   190 	} else {
   191 		ShowErrorMessage(errmsg, STR_5015_CAN_T_BUILD_BRIDGE_HERE, TileX(end) * TILE_SIZE, TileY(end) * TILE_SIZE);
   191 		ShowErrorMessage(errmsg, STR_5015_CAN_T_BUILD_BRIDGE_HERE, TileX(end) * TILE_SIZE, TileY(end) * TILE_SIZE);
   192 	}
   192 	}