From 92344621233c08c328a8225cba3fac15dcc44377 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 17 Jan 2006 23:43:20 +0000 Subject: [PATCH] hack to fix start on MiniMenu (I have some thoughts to clean this up, on the lines of allowing NextScreen to expicitly say "pop a screen", but I need to think about it some more.) --- stepmania/src/ScreenMiniMenu.cpp | 10 ++++++++++ stepmania/src/ScreenMiniMenu.h | 1 + 2 files changed, 11 insertions(+) diff --git a/stepmania/src/ScreenMiniMenu.cpp b/stepmania/src/ScreenMiniMenu.cpp index a51ed55362..4cb1b25aa1 100644 --- a/stepmania/src/ScreenMiniMenu.cpp +++ b/stepmania/src/ScreenMiniMenu.cpp @@ -31,6 +31,16 @@ void ScreenMiniMenu::MiniMenu( MenuDef* pDef, ScreenMessage SM_SendOnOK, ScreenM //REGISTER_SCREEN_CLASS( ScreenMiniMenu ); +void ScreenMiniMenu::BeginScreen() +{ + ScreenOptions::BeginScreen(); + + /* HACK: An OptionRow exits if a screen is set. ScreenMiniMenu is always pushed, so we + * don't set screens to load. Set a dummy screen, so ScreenOptions::GetNextScreenForSelection + * will know to move on. */ + m_sNextScreen = "xxx"; +} + void ScreenMiniMenu::LoadMenu( const MenuDef* pDef ) { m_vMenuRows = pDef->rows; diff --git a/stepmania/src/ScreenMiniMenu.h b/stepmania/src/ScreenMiniMenu.h index fdf79b3d22..2f2e56ff64 100644 --- a/stepmania/src/ScreenMiniMenu.h +++ b/stepmania/src/ScreenMiniMenu.h @@ -88,6 +88,7 @@ class ScreenMiniMenu : public ScreenOptions public: static void MiniMenu( MenuDef* pDef, ScreenMessage smSendOnOK, ScreenMessage smSendOnCancel = SM_None, float fX = 0, float fY = 0 ); + void BeginScreen(); void LoadMenu( const MenuDef* pDef ); void HandleScreenMessage( const ScreenMessage SM );