本文整理汇总了C++中CGUI::Restore方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUI::Restore方法的具体用法?C++ CGUI::Restore怎么用?C++ CGUI::Restore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUI
的用法示例。
在下文中一共展示了CGUI::Restore方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Restore
void CLocalGUI::Restore ( void )
{
CGUI* pGUI = CCore::GetSingleton ().GetGUI ();
if ( pGUI )
{
// Restore the GUI
pGUI->Restore ();
}
else
{
WriteDebugEvent ( "WARNING: CLocalGUI::Restore() called, but CLocalGUI::CreateObjects() isn't!" );
}
}
示例2: Restore
void CLocalGUI::Restore ( void )
{
CGUI* pGUI = CCore::GetSingleton ().GetGUI ();
if ( pGUI )
{
CFilePathTranslator FileTranslator;
string WorkingDirectory;
char szCurDir [ 1024 ];
// We must change the current directory here!
// This is necessary because if we don't, CLocalGUI will try to load
// files from the wrong path!
// Set the current directory.
FileTranslator.SetCurrentWorkingDirectory ( "MTA" );
FileTranslator.GetCurrentWorkingDirectory ( WorkingDirectory );
GetCurrentDirectory ( sizeof ( szCurDir ), szCurDir );
SetCurrentDirectory ( WorkingDirectory.c_str ( ) );
// Restore the GUI
pGUI->Restore ();
// Restore our renderer.
if ( m_pRendererLibrary )
{
m_pRendererLibrary->OnRestoreDevice ( );
}
else
{
WriteDebugEvent ( "WARNING: CLocalGUI::Restore() called, but CLocalGUI::CreateObjects() isn't!" );
}
// Restore the current directory to default.
SetCurrentDirectory ( szCurDir );
}
else
{
WriteDebugEvent ( "WARNING: CLocalGUI::Restore() called, but CLocalGUI::CreateObjects() isn't!" );
}
}