diff -r 2a6ee708ccd4 -r 6bf2ca3d8be4 src/settings_gui.cpp --- a/src/settings_gui.cpp Sun Sep 28 11:28:18 2008 +0200 +++ b/src/settings_gui.cpp Sun Sep 28 11:28:18 2008 +0200 @@ -751,6 +751,7 @@ struct PatchesSelectionWindow : Window { static const int setting_height; ///< Height of a single advanced setting text static const int config_patch_x_start; ///< Horizontal start of each advanced setting text + static const int config_patch_y_start; ///< Vertical position of first advanced setting text static GameSettings *patches_ptr; static int patches_max; ///< Maximal number of patches at a single page @@ -798,6 +799,7 @@ /* Check that start positions advanced setting entries are nicely aligned in the option panel widget */ assert(config_patch_x_start == desc->widgets[PATCHSEL_OPTIONSPANEL].left + 5); + assert(config_patch_y_start == desc->widgets[PATCHSEL_OPTIONSPANEL].top + 5); } virtual void OnPaint() @@ -810,7 +812,7 @@ this->DrawWidgets(); x = config_patch_x_start; - y = 47; + y = config_patch_y_start; for (i = 0; i != page->num; i++) { const SettingDesc *sd = page->entries[i].setting; const SettingDescBase *sdb = &sd->desc; @@ -868,7 +870,7 @@ int x, y; byte btn; - y = pt.y - 46 - 1; // Shift y coordinate + y = pt.y - config_patch_y_start; // Shift y coordinate if (y < 0) return; // Clicked above first entry x = pt.x - config_patch_x_start; // Shift x coordinate @@ -980,6 +982,7 @@ const int PatchesSelectionWindow::setting_height = 11; const int PatchesSelectionWindow::config_patch_x_start = 5; +const int PatchesSelectionWindow::config_patch_y_start = 47; GameSettings *PatchesSelectionWindow::patches_ptr = NULL; int PatchesSelectionWindow::patches_max = 0;