summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-05-23 13:52:10 +0000
committermaedhros <maedhros@openttd.org>2007-05-23 13:52:10 +0000
commit35ce34d55ac373674e6ff108afaca6cd549b06bb (patch)
tree0be961e36a9ab58a5191dae9fd87cc10a3247cca /src/main_gui.cpp
parentca5c578d0f51724d9c4e5b1101b81b442c049341 (diff)
downloadopenttd-35ce34d55ac373674e6ff108afaca6cd549b06bb.tar.xz
(svn r9901) -Codechange: Decide what to do with selected land areas based on the specific variable, not how it was highlighted.
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 806069775..73de8e195 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -1131,7 +1131,7 @@ static void PlaceProc_LowerBigLand(TileIndex tile)
static void PlaceProc_RockyArea(TileIndex tile)
{
- VpStartPlaceSizing(tile, VPM_X_AND_Y, GUI_PlaceProc_RockyArea);
+ VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_CREATE_ROCKS);
}
static void PlaceProc_LightHouse(TileIndex tile)
@@ -1158,12 +1158,12 @@ static void PlaceProc_Transmitter(TileIndex tile)
static void PlaceProc_DesertArea(TileIndex tile)
{
- VpStartPlaceSizing(tile, VPM_X_AND_Y, GUI_PlaceProc_DesertArea);
+ VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_CREATE_DESERT);
}
static void PlaceProc_WaterArea(TileIndex tile)
{
- VpStartPlaceSizing(tile, VPM_X_AND_Y, GUI_PlaceProc_WaterArea);
+ VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_CREATE_WATER);
}
static const Widget _scen_edit_land_gen_widgets[] = {
@@ -1382,8 +1382,13 @@ static void ScenEditLandGenWndProc(Window *w, WindowEvent *e)
case WE_PLACE_MOUSEUP:
if (e->we.place.pt.x != -1) {
- if (e->we.place.select_method == VPM_X_AND_Y) // dragged actions
- GUIPlaceProcDragXY(e);
+ switch (e->we.place.select_proc) {
+ case DDSP_CREATE_ROCKS:
+ case DDSP_CREATE_DESERT:
+ case DDSP_CREATE_WATER:
+ GUIPlaceProcDragXY(e);
+ break;
+ }
}
break;