本文整理汇总了C++中CInterfaceManager::createLocalBranch方法的典型用法代码示例。如果您正苦于以下问题:C++ CInterfaceManager::createLocalBranch方法的具体用法?C++ CInterfaceManager::createLocalBranch怎么用?C++ CInterfaceManager::createLocalBranch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CInterfaceManager
的用法示例。
在下文中一共展示了CInterfaceManager::createLocalBranch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initMainLoop
//---------------------------------------------------
// initMainLoop :
// Initialize the main loop.
//
// If you add something in this function, check CFarTP,
// some kind of reinitialization might be useful over there.
//---------------------------------------------------
void initMainLoop()
{
StartInitTime = NLMISC::CTime::getLocalTime();
Driver->clearBuffers(CRGBA::Black);
Driver->swapBuffers();
CNiceInputAuto niceInputs;
bool WantStartupProfiling = false;
#ifdef _PROFILE_ON_
if( WantStartupProfiling )
{
// start the bench.
NLMISC::CHTimer::startBench();
Driver->startBench();
}
#endif // _PROFILE_ON_
{ // profile init mainloop
H_AUTO ( RZ_Client_InitMainLoop );
FPU_CHECKER_ONCE
NLMISC::TTime initStart = ryzomGetLocalTime();
NLMISC::TTime initLast = initStart;
NLMISC::TTime initCurrent = initLast;
// Progress bar for init_main_loop()
ProgressBar.reset (BAR_STEP_INIT_MAIN_LOOP);
ucstring nmsg;
FPU_CHECKER_ONCE
// Get the interface manager
CInterfaceManager *pIM = CInterfaceManager::getInstance();
{
H_AUTO(RZUnInOut)
pIM->uninitOutGame();
}
initLast = initCurrent;
initCurrent = ryzomGetLocalTime();
//nlinfo ("PROFILE: %d seconds (%d total) for Uninitializing outgame", (uint32)(initCurrent-initLast)/1000, (uint32)(initCurrent-initStart)/1000);
// Create the game interface database
{
H_AUTO(InitRZDB)
// Initialize the Database.
nmsg = "Initializing XML Database ...";
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
IngameDbMngr.init(CPath::lookup("database.xml"), ProgressBar);
ICDBNode::CTextId textId("SERVER");
if( pIM->getDB()->getNode(textId, false) )
pIM->getDB()->removeNode(textId);
pIM->getDB()->attachChild(IngameDbMngr.getNodePtr(),"SERVER");
// Set the database
NetMngr.setDataBase (IngameDbMngr.getNodePtr());
initLast = initCurrent;
initCurrent = ryzomGetLocalTime();
//nlinfo ("PROFILE: %d seconds (%d total) for Initializing XML database", (uint32)(initCurrent-initLast)/1000, (uint32)(initCurrent-initStart)/1000);
}
// Create interface database
{
H_AUTO(InitRZUI)
// Initialize interface v3 should be done after IngameDbMngr.init()
nmsg = "Initializing Interface Database ...";
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
// Add the LOCAL branch
ICDBNode::CTextId textId("LOCAL");
if( pIM->getDB()->getNode(textId, false) )
pIM->getDB()->removeNode(textId);
pIM->createLocalBranch(CPath::lookup("local_database.xml"), ProgressBar);
initLast = initCurrent;
initCurrent = ryzomGetLocalTime();
//nlinfo ("PROFILE: %d seconds (%d total) for Initializing interface", (uint32)(initCurrent-initLast)/1000, (uint32)(initCurrent-initStart)/1000);
}
{
// Ask and receive the user position to start (Olivier: moved here because needed by initInGame())
nmsg = "Awaiting Start Position ...";
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
waitForUserCharReceived();
initLast = initCurrent;
//.........这里部分代码省略.........