//-------------------------------------------------------------------------- /// <CODE-GENERATE>{GlobalClientFuncImpl} void TexasPokerHallAgentC::C_RecLogin(const LoginResult& tResult) { /// <CODE-IMPLEMENT>{RecLogin} if(tResult <= LOGIN_CREATE) { S_ReqSyncTime(); UILayer* pkMainLayer = g_pLayerManager->GetCurrentMainLayer(); if(!VeStrcmp(pkMainLayer->GetName(), Login::GetName())) { static_cast<Login*>(pkMainLayer)->IntoHall(); } else { GetPlayer()->S_ReqInitHall(); UILayer* pkLayer = g_pLayerManager->GetCurrentMainLayer(); if(pkLayer) { pkLayer->OnForceUpdate(); } } } else { g_pkGame->ShowAlert(VE_NEW HallLoginFailed(tResult)); } /// </CODE-IMPLEMENT>{RecLogin} }
void UILayerManager::DelLayer(const VeChar8* pcName) { if(pcName) { VeUInt32* it = m_kLayerMap.Find(pcName); if(it) { VeUInt32 u32Index = *it; if(u32Index < (m_kLayerSet.Size() - 1)) { UILayer* pkLayer = m_kLayerSet[u32Index]; UILayer* pkMove = m_kLayerSet.Back(); m_kLayerMap[pkMove->GetName()] = u32Index; m_kLayerSet[u32Index] = pkMove; m_kLayerSet.Back() = pkLayer; } m_kLayerMap.Remove(pcName); VE_SAFE_DELETE(m_kLayerSet.Back()); m_kLayerSet.PopBack(); } } }