From 20e18ef41d11153e1d9b44edbd3115d0f78c6712 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 30 Nov 2014 04:59:34 +0000 Subject: [PATCH] Open the load and save menus with the last used slot highlighted. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4782 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/menus.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 7b29b2b2f..6f4309475 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2978,6 +2978,7 @@ void M_ChangeMenu(MenuID_t cm) return; m_previousMenu = m_currentMenu; + g_previousMenu = g_currentMenu; m_currentMenu = search; g_currentMenu = cm; } @@ -2986,7 +2987,14 @@ void M_ChangeMenu(MenuID_t cm) switch (g_currentMenu) { + case MENU_LOAD: + if (g_lastSaveSlot >= 0 && g_previousMenu != MENU_LOADVERIFY) + M_LOAD.currentEntry = g_lastSaveSlot; + break; + case MENU_SAVE: + if (g_lastSaveSlot >= 0 && g_previousMenu != MENU_SAVEVERIFY) + M_SAVE.currentEntry = g_lastSaveSlot; if (g_player[myconnectindex].ps->gm&MODE_GAME) { g_screenCapture = 1; @@ -4691,10 +4699,7 @@ void M_DisplayMenus(void) } if (!M_IsTextInput(m_currentMenu) && KB_KeyPressed(sc_Q)) - { - g_previousMenu = g_currentMenu; M_ChangeMenuAnimate(MENU_QUIT, MA_Advance); - } M_RunMenuInput(m_currentMenu);