From 9b3ae770fba370bde784244c33fd07fdc62034ea Mon Sep 17 00:00:00 2001 From: Misa Date: Wed, 18 Aug 2021 09:17:41 -0700 Subject: [PATCH] Account for lack of prev/next options if only one page of levels Otherwise the seventh and eighth levels would be grouped with the return menu button. Fixes #826. --- desktop_version/src/Graphics.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 5cfc25f9..ad60f58b 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1595,7 +1595,16 @@ void Graphics::drawmenu( int cr, int cg, int cb, bool levelmenu /*= false*/ ) if (levelmenu) { - if (game.menuoptions.size() - i <= 3) + size_t separator; + if (ed.ListOfMetaData.size() > 8) + { + separator = 3; + } + else + { + separator = 1; + } + if (game.menuoptions.size() - i <= separator) { // We're on "next page", "previous page", or "return to menu". Draw them separated by a bit y += 8;