summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--genworld_gui.c12
-rw-r--r--intro_gui.c5
2 files changed, 12 insertions, 5 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);
diff --git a/intro_gui.c b/intro_gui.c
index 84851a365..056754a4c 100644
--- a/intro_gui.c
+++ b/intro_gui.c
@@ -50,7 +50,10 @@ static void SelectGameWndProc(Window *w, WindowEvent *e)
case WE_CREATE: LowerWindowWidget(w, _opt_newgame.landscape + 8); break;
case WE_PAINT:
- LowerWindowWidget(w, _opt_newgame.landscape + 8); // All buttons get automagically unclicked
+ SetWidgetLoweredState(w, 8, _opt_newgame.landscape == LT_NORMAL);
+ SetWidgetLoweredState(w, 9, _opt_newgame.landscape == LT_HILLY);
+ SetWidgetLoweredState(w, 10, _opt_newgame.landscape == LT_DESERT);
+ SetWidgetLoweredState(w, 11, _opt_newgame.landscape == LT_CANDY);
SetDParam(0, STR_6801_EASY + _opt_newgame.diff_level);
DrawWindowWidgets(w);
break;