preload minimenu (yuck, need a better way to do this)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user