From 1a68af5e69848e82a4a57f96a9edf7e42ee61937 Mon Sep 17 00:00:00 2001 From: glx Date: Wed, 4 Oct 2006 00:27:31 +0000 Subject: (svn r6633) -Fix r6631: climate selector now shows the current selected climate (and only this one) --- genworld_gui.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'genworld_gui.c') 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); -- cgit v1.2.3-54-g00ecf