summaryrefslogtreecommitdiff
path: root/genworld_gui.c
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2006-10-04 00:27:31 +0000
committerglx <glx@openttd.org>2006-10-04 00:27:31 +0000
commit1a68af5e69848e82a4a57f96a9edf7e42ee61937 (patch)
tree2ccab3645e1a47887c3712f866915230f7b71aa8 /genworld_gui.c
parent0163743214b483e9988084fa6cc78f9fcc02f181 (diff)
downloadopenttd-1a68af5e69848e82a4a57f96a9edf7e42ee61937.tar.xz
(svn r6633) -Fix r6631: climate selector now shows the current selected climate (and only this one)
Diffstat (limited to 'genworld_gui.c')
-rw-r--r--genworld_gui.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/genworld_gui.c b/genworld_gui.c
index b60f7894e..6090fe426 100644
--- a/genworld_gui.c
+++ b/genworld_gui.c
@@ -241,7 +241,10 @@ void GenerateLandscapeWndProc(Window *w, WindowEvent *e)
SetWindowWidgetDisabledState(w, 21, _patches_newgame.snow_line_height <= 2 || _opt_newgame.landscape != LT_HILLY);
SetWindowWidgetDisabledState(w, 23, _patches_newgame.snow_line_height >= 13 || _opt_newgame.landscape != LT_HILLY);
- LowerWindowWidget(w, _opt_newgame.landscape + 3); // All buttons get automagically unclicked
+ SetWidgetLoweredState(w, 3, _opt_newgame.landscape == LT_NORMAL);
+ SetWidgetLoweredState(w, 4, _opt_newgame.landscape == LT_HILLY);
+ SetWidgetLoweredState(w, 5, _opt_newgame.landscape == LT_DESERT);
+ SetWidgetLoweredState(w, 6, _opt_newgame.landscape == LT_CANDY);
DrawWindowWidgets(w);
y = (mode == GLWP_HEIGHTMAP) ? 22 : 0;
@@ -330,7 +333,6 @@ void GenerateLandscapeWndProc(Window *w, WindowEvent *e)
case 3: case 4: case 5: case 6:
RaiseWindowWidget(w, _opt_newgame.landscape + 3);
SetNewLandscapeType(e->we.click.widget - 3);
- LowerWindowWidget(w, _opt_newgame.landscape + 3);
break;
case 7: case 8: // Mapsize X
ShowDropDownMenu(w, mapsizes, _patches_newgame.map_x - 6, 8, 0, 0);
@@ -592,7 +594,10 @@ void CreateScenarioWndProc(Window *w, WindowEvent *e)
SetWindowWidgetDisabledState(w, 17, _patches_newgame.se_flat_world_height <= 0);
SetWindowWidgetDisabledState(w, 19, _patches_newgame.se_flat_world_height >= 15);
- LowerWindowWidget(w, _opt_newgame.landscape + 3); // All buttons get automagically unclicked
+ SetWidgetLoweredState(w, 3, _opt_newgame.landscape == LT_NORMAL);
+ SetWidgetLoweredState(w, 4, _opt_newgame.landscape == LT_HILLY);
+ SetWidgetLoweredState(w, 5, _opt_newgame.landscape == LT_DESERT);
+ SetWidgetLoweredState(w, 6, _opt_newgame.landscape == LT_CANDY);
DrawWindowWidgets(w);
DrawString( 12, 96, STR_MAPSIZE, 0);
@@ -615,7 +620,6 @@ void CreateScenarioWndProc(Window *w, WindowEvent *e)
case 3: case 4: case 5: case 6:
RaiseWindowWidget(w, _opt_newgame.landscape + 3);
SetNewLandscapeType(e->we.click.widget - 3);
- LowerWindowWidget(w, _opt_newgame.landscape + 3);
break;
case 7: case 8: // Mapsize X
ShowDropDownMenu(w, mapsizes, _patches_newgame.map_x - 6, 8, 0, 0);