preload minimenu (yuck, need a better way to do this)

This commit is contained in:
Glenn Maynard
2005-08-14 03:59:53 +00:00
parent 4574e3e496
commit 8f0c56b831
2 changed files with 14 additions and 1 deletions
+11 -1
View File
@@ -105,6 +105,7 @@ ScreenOptionsManageProfiles::~ScreenOptionsManageProfiles()
FOREACH( OptionRowHandler*, m_OptionRowHandlers, h )
SAFE_DELETE( *h );
m_OptionRowHandlers.clear();
SAFE_DELETE( m_pContextMenu );
}
void ScreenOptionsManageProfiles::Init()
@@ -112,6 +113,10 @@ void ScreenOptionsManageProfiles::Init()
ScreenOptions::Init();
SetInputMode( INPUTMODE_SHARE_CURSOR );
m_pContextMenu = new ScreenMiniMenu( g_TempMenu.sClassName );
m_pContextMenu->Init();
m_pContextMenu->LoadMenu( &g_TempMenu );
}
void ScreenOptionsManageProfiles::BeginScreen()
@@ -353,7 +358,12 @@ void ScreenOptionsManageProfiles::ProcessMenuStart( PlayerNumber pn, const Input
int iWidth, iX, iY;
this->GetWidthXY( PLAYER_1, iCurRow, 0, iWidth, iX, iY );
ScreenMiniMenu::MiniMenu( &g_TempMenu, SM_BackFromContextMenu, SM_BackFromContextMenu, (float)iX, (float)iY );
m_pContextMenu->LoadMenu( &g_TempMenu );
m_pContextMenu->SetOKMessage( SM_BackFromContextMenu );
m_pContextMenu->SetCancelMessage( SM_BackFromContextMenu );
m_pContextMenu->SetXY( (float)iX, (float)iY );
SCREENMAN->PushScreen( m_pContextMenu );
}
}
@@ -2,6 +2,7 @@
#define ScreenOptionsManageProfiles_H
#include "ScreenOptions.h"
#include "ScreenMiniMenu.h"
class Course;
@@ -28,6 +29,8 @@ protected:
vector<CString> m_vsLocalProfileID;
vector<OptionRowHandler*> m_OptionRowHandlers;
ScreenMiniMenu *m_pContextMenu;
};
#endif