src/road_gui.cpp
branchnoai
changeset 9686 d3c195c226f9
parent 9641 855e32c08c9b
child 9694 e72987579514
equal deleted inserted replaced
9685:d988aad9fc52 9686:d3c195c226f9
     4 
     4 
     5 #include "stdafx.h"
     5 #include "stdafx.h"
     6 #include "openttd.h"
     6 #include "openttd.h"
     7 #include "table/sprites.h"
     7 #include "table/sprites.h"
     8 #include "table/strings.h"
     8 #include "table/strings.h"
       
     9 #include "strings.h"
     9 #include "functions.h"
    10 #include "functions.h"
    10 #include "map.h"
    11 #include "map.h"
    11 #include "tile.h"
    12 #include "tile.h"
    12 #include "window.h"
    13 #include "window.h"
    13 #include "gui.h"
    14 #include "gui.h"
   551 		LowerWindowWidget(w, _road_station_picker_orientation + 3);
   552 		LowerWindowWidget(w, _road_station_picker_orientation + 3);
   552 		LowerWindowWidget(w, _station_show_coverage + 9);
   553 		LowerWindowWidget(w, _station_show_coverage + 9);
   553 		break;
   554 		break;
   554 
   555 
   555 	case WE_PAINT: {
   556 	case WE_PAINT: {
   556 		int image;
       
   557 
       
   558 		if (WP(w, def_d).close) return;
   557 		if (WP(w, def_d).close) return;
   559 
   558 
   560 		DrawWindowWidgets(w);
   559 		DrawWindowWidgets(w);
   561 
   560 
   562 		if (_station_show_coverage) {
   561 		if (_station_show_coverage) {
   564 			SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
   563 			SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
   565 		} else {
   564 		} else {
   566 			SetTileSelectSize(1, 1);
   565 			SetTileSelectSize(1, 1);
   567 		}
   566 		}
   568 
   567 
   569 		image = (w->window_class == WC_BUS_STATION) ? GFX_BUS_BASE : GFX_TRUCK_BASE;
   568 		StationType st = (w->window_class == WC_BUS_STATION) ? STATION_BUS : STATION_TRUCK;
   570 
   569 
   571 		StationPickerDrawSprite(103, 35, RAILTYPE_BEGIN, ROADTYPE_ROAD, image);
   570 		StationPickerDrawSprite(103, 35, st, RAILTYPE_BEGIN, ROADTYPE_ROAD, 0);
   572 		StationPickerDrawSprite(103, 85, RAILTYPE_BEGIN, ROADTYPE_ROAD, image + 1);
   571 		StationPickerDrawSprite(103, 85, st, RAILTYPE_BEGIN, ROADTYPE_ROAD, 1);
   573 		StationPickerDrawSprite(35, 85, RAILTYPE_BEGIN, ROADTYPE_ROAD, image + 2);
   572 		StationPickerDrawSprite( 35, 85, st, RAILTYPE_BEGIN, ROADTYPE_ROAD, 2);
   574 		StationPickerDrawSprite(35, 35, RAILTYPE_BEGIN, ROADTYPE_ROAD, image + 3);
   573 		StationPickerDrawSprite( 35, 35, st, RAILTYPE_BEGIN, ROADTYPE_ROAD, 3);
   575 
   574 
   576 		image = (w->window_class == WC_BUS_STATION) ? GFX_BUS_BASE_EXT : GFX_TRUCK_BASE_EXT;
   575 		StationPickerDrawSprite(171, 35, st, RAILTYPE_BEGIN, _cur_roadtype, 4);
   577 
   576 		StationPickerDrawSprite(171, 85, st, RAILTYPE_BEGIN, _cur_roadtype, 5);
   578 		StationPickerDrawSprite(171, 35, RAILTYPE_BEGIN, _cur_roadtype, image);
       
   579 		StationPickerDrawSprite(171, 85, RAILTYPE_BEGIN, _cur_roadtype, image + 1);
       
   580 
   577 
   581 		DrawStationCoverageAreaText(2, 146,
   578 		DrawStationCoverageAreaText(2, 146,
   582 			(w->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY,
   579 			(w->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY,
   583 			3);
   580 			3);
   584 
   581