mirror of https://github.com/OpenTTD/OpenTTD
(svn r1485) -Fix: [1031451] Catchment area shows when buying sign. Catchment area wasn't reset when road station window was unselected
-Fix: small GUI glitch in terraform toolbarrelease/0.4.5
parent
1a450b0b39
commit
ff23795f5b
23
road_gui.c
23
road_gui.c
|
@ -399,28 +399,23 @@ static void ShowRoadDepotPicker()
|
||||||
AllocateWindowDesc(&_build_road_depot_desc);
|
AllocateWindowDesc(&_build_road_depot_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void RoadStationPickerWndProc(Window *w, WindowEvent *e) {
|
static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
|
||||||
|
{
|
||||||
int rad;
|
|
||||||
|
|
||||||
switch(e->event) {
|
switch(e->event) {
|
||||||
case WE_PAINT: {
|
case WE_PAINT: {
|
||||||
int image;
|
int image;
|
||||||
|
|
||||||
|
if (WP(w,def_d).close) return;
|
||||||
|
|
||||||
w->click_state = ((1<<3) << _road_station_picker_orientation) |
|
w->click_state = ((1<<3) << _road_station_picker_orientation) |
|
||||||
((1<<7) << _station_show_coverage);
|
((1<<7) << _station_show_coverage);
|
||||||
DrawWindowWidgets(w);
|
DrawWindowWidgets(w);
|
||||||
|
|
||||||
SetTileSelectSize(1, 1);
|
if (_station_show_coverage) {
|
||||||
|
int rad = _patches.modified_catchment ? CA_TRUCK /* = CA_BUS */ : 4;
|
||||||
if (_patches.modified_catchment) {
|
SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
|
||||||
rad = CA_TRUCK; // = CA_BUS
|
} else
|
||||||
} else {
|
SetTileSelectSize(1, 1);
|
||||||
rad = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_station_show_coverage)
|
|
||||||
SetTileSelectBigSize(-rad, -rad, 2*rad, 2*rad);
|
|
||||||
|
|
||||||
image = (w->window_class == WC_BUS_STATION) ? 0x47 : 0x43;
|
image = (w->window_class == WC_BUS_STATION) ? 0x47 : 0x43;
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ static const Widget _terraform_widgets[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const WindowDesc _terraform_desc = {
|
static const WindowDesc _terraform_desc = {
|
||||||
640-157, 22+36, 157, 36,
|
640-157, 22+36, 158, 36,
|
||||||
WC_SCEN_LAND_GEN,0,
|
WC_SCEN_LAND_GEN,0,
|
||||||
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
|
||||||
_terraform_widgets,
|
_terraform_widgets,
|
||||||
|
|
Loading…
Reference in New Issue