comparison src/depot_gui.cpp @ 11433:07857d65c41a draft

(svn r15791) -Codechange: remove the *RightAligned part of the old text drawing API.
author rubidium <rubidium@openttd.org>
date Sat, 21 Mar 2009 22:22:00 +0000
parents 474ba6cc0946
children 4557701373cc
comparison
equal deleted inserted replaced
11432:a20dd0000d96 11433:07857d65c41a
270 case VEH_TRAIN: 270 case VEH_TRAIN:
271 DrawTrainImage(v, x + 21, sprite_y, this->sel, this->hscroll.cap + 4, this->hscroll.pos); 271 DrawTrainImage(v, x + 21, sprite_y, this->sel, this->hscroll.cap + 4, this->hscroll.pos);
272 272
273 /* Number of wagons relative to a standard length wagon (rounded up) */ 273 /* Number of wagons relative to a standard length wagon (rounded up) */
274 SetDParam(0, (v->u.rail.cached_total_length + 7) / 8); 274 SetDParam(0, (v->u.rail.cached_total_length + 7) / 8);
275 DrawStringRightAligned(this->widget[DEPOT_WIDGET_MATRIX].right - 1, y + 4, STR_TINY_BLACK, TC_FROMSTRING); // Draw the counter 275 DrawString(this->widget[DEPOT_WIDGET_MATRIX].left, this->widget[DEPOT_WIDGET_MATRIX].right - 1, y + 4, STR_TINY_BLACK, TC_FROMSTRING, SA_RIGHT); // Draw the counter
276 break; 276 break;
277 277
278 case VEH_ROAD: DrawRoadVehImage( v, x + 24, sprite_y, this->sel, 1); break; 278 case VEH_ROAD: DrawRoadVehImage( v, x + 24, sprite_y, this->sel, 1); break;
279 case VEH_SHIP: DrawShipImage( v, x + 19, sprite_y - 1, this->sel); break; 279 case VEH_SHIP: DrawShipImage( v, x + 19, sprite_y - 1, this->sel); break;
280 case VEH_AIRCRAFT: { 280 case VEH_AIRCRAFT: {
374 /* Draw the train counter */ 374 /* Draw the train counter */
375 i = 0; 375 i = 0;
376 u = v; 376 u = v;
377 do i++; while ((u = u->Next()) != NULL); // Determine length of train 377 do i++; while ((u = u->Next()) != NULL); // Determine length of train
378 SetDParam(0, i); // Set the counter 378 SetDParam(0, i); // Set the counter
379 DrawStringRightAligned(this->widget[DEPOT_WIDGET_MATRIX].right - 1, y + 4, STR_TINY_BLACK, TC_FROMSTRING); // Draw the counter 379 DrawString(this->widget[DEPOT_WIDGET_MATRIX].left, this->widget[DEPOT_WIDGET_MATRIX].right - 1, y + 4, STR_TINY_BLACK, TC_FROMSTRING, SA_RIGHT); // Draw the counter
380 } 380 }
381 } 381 }
382 382
383 struct GetDepotVehiclePtData { 383 struct GetDepotVehiclePtData {
384 const Vehicle *head; 384 const Vehicle *head;