ship_gui.c
changeset 1977 37bbebf94434
parent 1962 8254df1b359b
child 1986 fcc849a38ae6
equal deleted inserted replaced
1976:2eb82bb3cb2d 1977:37bbebf94434
   300 	w = AllocateWindowDesc(&_ship_details_desc);
   300 	w = AllocateWindowDesc(&_ship_details_desc);
   301 	w->window_number = veh;
   301 	w->window_number = veh;
   302 	w->caption_color = v->owner;
   302 	w->caption_color = v->owner;
   303 }
   303 }
   304 
   304 
   305 void CcBuildShip(bool success, uint tile, uint32 p1, uint32 p2)
   305 void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
   306 {
   306 {
   307 	Vehicle *v;
   307 	Vehicle *v;
   308 	if (!success) return;
   308 	if (!success) return;
   309 
   309 
   310 	v = GetVehicle(_new_ship_id);
   310 	v = GetVehicle(_new_ship_id);
   600 	}
   600 	}
   601 }
   601 }
   602 
   602 
   603 static void DrawShipDepotWindow(Window *w)
   603 static void DrawShipDepotWindow(Window *w)
   604 {
   604 {
   605 	uint tile;
   605 	TileIndex tile;
   606 	Vehicle *v;
   606 	Vehicle *v;
   607 	int num,x,y;
   607 	int num,x,y;
   608 	Depot *depot;
   608 	Depot *depot;
   609 
   609 
   610 	tile = w->window_number;
   610 	tile = w->window_number;
   823 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
   823 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
   824 	_ship_depot_widgets,
   824 	_ship_depot_widgets,
   825 	ShipDepotWndProc
   825 	ShipDepotWndProc
   826 };
   826 };
   827 
   827 
   828 void ShowShipDepotWindow(uint tile)
   828 void ShowShipDepotWindow(TileIndex tile)
   829 {
   829 {
   830 	Window *w;
   830 	Window *w;
   831 
   831 
   832 	w = AllocateWindowDescFront(&_ship_depot_desc,tile);
   832 	w = AllocateWindowDescFront(&_ship_depot_desc,tile);
   833 	if (w) {
   833 	if (w) {
  1008 				ShowShipViewWindow(v);
  1008 				ShowShipViewWindow(v);
  1009 			}
  1009 			}
  1010 		} break;
  1010 		} break;
  1011 
  1011 
  1012 		case 9: { /* Build new Vehicle */
  1012 		case 9: { /* Build new Vehicle */
  1013 			uint tile;
  1013 			TileIndex tile;
  1014 
  1014 
  1015 			if (!IsWindowOfPrototype(w, _player_ships_widgets))
  1015 			if (!IsWindowOfPrototype(w, _player_ships_widgets))
  1016 				break;
  1016 				break;
  1017 
  1017 
  1018 
  1018