From: Holger Schemel Date: Sat, 14 Jan 2017 19:59:21 +0000 (+0100) Subject: improved changing level in main menu (regardless of cursor position) X-Git-Tag: 4.0.0.2~33 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=d9f4fa4058d96f5bfc195ece7bf19a8e0fe32064 improved changing level in main menu (regardless of cursor position) --- diff --git a/src/screens.c b/src/screens.c index a2f63bcd..641c5e07 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1849,11 +1849,7 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) pos = choice + dy; } - if (pos == MAIN_CONTROL_LEVELS && dx != 0 && button) - { - HandleMainMenu_SelectLevel(1, (dx < 0 ? -1 : +1), NO_DIRECT_LEVEL_SELECT); - } - else if (pos == MAIN_CONTROL_FIRST_LEVEL && !button) + if (pos == MAIN_CONTROL_FIRST_LEVEL && !button) { HandleMainMenu_SelectLevel(MAX_LEVELS, -1, NO_DIRECT_LEVEL_SELECT); } @@ -1882,6 +1878,12 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) choice = pos; } + else if (dx != 0) + { + if (choice != MAIN_CONTROL_INFO && + choice != MAIN_CONTROL_SETUP) + HandleMainMenu_SelectLevel(1, dx, NO_DIRECT_LEVEL_SELECT); + } } else {