src/roadveh_gui.cpp
branchcpp_gui
changeset 6258 a2f86b8fd99b
parent 6250 5135b200b376
child 6285 187e3ef04cc9
--- a/src/roadveh_gui.cpp	Sat Feb 17 13:08:51 2007 +0000
+++ b/src/roadveh_gui.cpp	Sun Feb 18 14:17:28 2007 +0000
@@ -26,7 +26,7 @@
 	}
 }
 
-static void RoadVehDetailsWndProc(Window *w, WindowEvent *e)
+static void RoadVehDetailsWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
 	case WE_PAINT: {
@@ -139,7 +139,7 @@
 	}
 }
 
-static const Widget _roadveh_details_widgets[] = {
+static const OldWidget _roadveh_details_widgets[] = {
 {   WWT_CLOSEBOX,   RESIZE_NONE,    14,     0,    10,     0,    13, STR_00C5,         STR_018B_CLOSE_WINDOW},
 {    WWT_CAPTION,   RESIZE_NONE,    14,    11,   339,     0,    13, STR_900C_DETAILS, STR_018C_WINDOW_TITLE_DRAG_THIS},
 { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   340,   379,     0,    13, STR_01AA_NAME,    STR_902E_NAME_ROAD_VEHICLE},
@@ -161,13 +161,13 @@
 
 static void ShowRoadVehDetailsWindow(const Vehicle *v)
 {
-	Window *w;
+	BaseWindow *w;
 	VehicleID veh = v->index;
 
 	DeleteWindowById(WC_VEHICLE_ORDERS, veh);
 	DeleteWindowById(WC_VEHICLE_DETAILS, veh);
 
-	w = AllocateWindowDescFront(&_roadveh_details_desc, veh);
+	w = BaseWindow::AllocateFront(&_roadveh_details_desc, veh);
 	w->caption_color = v->owner;
 }
 
@@ -176,7 +176,7 @@
 	if (success) ShowRoadVehViewWindow(GetVehicle(_new_vehicle_id));
 }
 
-static void RoadVehViewWndProc(Window *w, WindowEvent *e)
+static void RoadVehViewWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
 	case WE_PAINT: {
@@ -291,8 +291,8 @@
 			const Vehicle *v = GetVehicle(w->window_number);
 			bool rv_stopped = IsRoadVehInDepotStopped(v);
 
-			/* Widget 7 (send to depot) must be hidden if the truck/bus is already stopped in depot.
-			 * Widget 11 (clone) should then be shown, since cloning is allowed only while in depot and stopped.
+			/* OldWidget 7 (send to depot) must be hidden if the truck/bus is already stopped in depot.
+			 * OldWidget 11 (clone) should then be shown, since cloning is allowed only while in depot and stopped.
 			 * This sytem allows to have two buttons, on top of each other.
 			 * The same system applies to widget 8 and 12, force turn around and refit. */
 			if (rv_stopped != w->IsWidgetHidden(7) || rv_stopped == w->IsWidgetHidden(11)) {
@@ -306,7 +306,7 @@
 	}
 }
 
-static const Widget _roadveh_view_widgets[] = {
+static const OldWidget _roadveh_view_widgets[] = {
 {   WWT_CLOSEBOX, RESIZE_NONE,  14,   0,  10,   0,  13, STR_00C5,                STR_018B_CLOSE_WINDOW },
 {    WWT_CAPTION, RESIZE_RIGHT, 14,  11, 237,   0,  13, STR_9002,                STR_018C_WINDOW_TITLE_DRAG_THIS },
 {  WWT_STICKYBOX, RESIZE_LR,    14, 238, 249,   0,  13, 0x0,                     STR_STICKY_BUTTON },
@@ -335,7 +335,7 @@
 
 void ShowRoadVehViewWindow(const Vehicle *v)
 {
-	Window *w = AllocateWindowDescFront(&_roadveh_view_desc, v->index);
+	BaseWindow *w = BaseWindow::AllocateFront(&_roadveh_view_desc, v->index);
 
 	if (w != NULL) {
 		w->caption_color = v->owner;