mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
(svn r12570) -Cleanup: further variable scope in road_gui.cpp
This commit is contained in:
parent
b78e8f82e1
commit
d1c0e57901
@ -570,6 +570,7 @@ static void BuildRoadToolbWndProc(Window *w, WindowEvent *e)
|
|||||||
TileIndex end_tile = e->we.place.tile;
|
TileIndex end_tile = e->we.place.tile;
|
||||||
|
|
||||||
switch (e->we.place.select_proc) {
|
switch (e->we.place.select_proc) {
|
||||||
|
default: NOT_REACHED();
|
||||||
case DDSP_BUILD_BRIDGE:
|
case DDSP_BUILD_BRIDGE:
|
||||||
ResetObjectToPlace();
|
ResetObjectToPlace();
|
||||||
ShowBuildBridgeWindow(start_tile, end_tile, TRANSPORT_ROAD, RoadTypeToRoadTypes(_cur_roadtype));
|
ShowBuildBridgeWindow(start_tile, end_tile, TRANSPORT_ROAD, RoadTypeToRoadTypes(_cur_roadtype));
|
||||||
@ -887,10 +888,9 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
|
|||||||
ResizeWindowForWidget(w, BRSW_BACKGROUND, 0, text_end - w->widget[BRSW_BACKGROUND].bottom);
|
ResizeWindowForWidget(w, BRSW_BACKGROUND, 0, text_end - w->widget[BRSW_BACKGROUND].bottom);
|
||||||
SetWindowDirty(w);
|
SetWindowDirty(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case WE_CLICK: {
|
case WE_CLICK:
|
||||||
switch (e->we.click.widget) {
|
switch (e->we.click.widget) {
|
||||||
case BRSW_STATION_NE:
|
case BRSW_STATION_NE:
|
||||||
case BRSW_STATION_SE:
|
case BRSW_STATION_SE:
|
||||||
@ -917,16 +917,16 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} break;
|
break;
|
||||||
|
|
||||||
case WE_MOUSELOOP: {
|
case WE_MOUSELOOP:
|
||||||
if (WP(w, def_d).close) {
|
if (WP(w, def_d).close) {
|
||||||
DeleteWindow(w);
|
DeleteWindow(w);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckRedrawStationCoverage(w);
|
CheckRedrawStationCoverage(w);
|
||||||
} break;
|
break;
|
||||||
|
|
||||||
case WE_DESTROY:
|
case WE_DESTROY:
|
||||||
if (!WP(w, def_d).close) ResetObjectToPlace();
|
if (!WP(w, def_d).close) ResetObjectToPlace();
|
||||||
|
Loading…
Reference in New Issue
Block a user