本文整理汇总了C++中Container::EnableControls方法的典型用法代码示例。如果您正苦于以下问题:C++ Container::EnableControls方法的具体用法?C++ Container::EnableControls怎么用?C++ Container::EnableControls使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Container
的用法示例。
在下文中一共展示了Container::EnableControls方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckVersionCompletion
void InitLogic::CheckVersionCompletion(AsyncOp *theOp)
{
Container *aLobbyContainer = LobbyScreen::GetLobbyContainer();
if(aLobbyContainer==NULL)
return;
CheckValidVersionOp *anOp = (CheckValidVersionOp*)theOp;
WONStatus aStatus = anOp->GetStatus();
LobbyMisc::SetVersionStatus(aStatus);
if(aStatus!=WS_Success && aStatus!=WS_DBProxyServ_ValidNotLatest && aStatus!=WS_DBProxyServ_OutOfDate)
{
// any other error is considered a get version error
if(aStatus==WS_DBProxyServ_OutOfDateNoUpdate || aStatus==WS_DBProxyServ_DBError) // try next server on retry
{
ServerContext *aPatchServers = LobbyMisc::GetPatchServers();
if(aPatchServers!=NULL)
aPatchServers->NotifyFailed(anOp->GetCurAddr());
}
GUIString aString = StringLocalize::GetStr(LobbyContainer_VersionCheckFailure_String,FriendlyWONStatusToString(aStatus));
SetLastInitError(InitErrorFlag_VersionCheckFailure,aString);
return;
}
ControlIdSet anEnable;
anEnable.AddIds(ID_ShowCreateAccount,ID_ShowLostPassword,ID_ShowLostUserName);
aLobbyContainer->EnableControls(anEnable,true);
LobbyEvent::BroadcastEvent(new LoginInitStatusEvent(LobbyContainer_InitComplete_String,LoginInitStatus_InitSuccess));
}
示例2: DoInit
void InitLogic::DoInit()
{
mIgnoreInitErrorFlags = 0;
// Load the lobby's persistent data
LobbyPersistentData::ReadGlobal();
// Set the preferred network adapter
IPAddr::SetLocalHost(LobbyPersistentData::GetNetworkAdapter(),true);
// Find the current modified times of the TOU
SetTOUTimes();
// Init UDP Manager
// fixme, choose network adapter first
LobbyMisc::RestartUDPManager();
// Fill in the login names in the LoginCtrl
LobbyEvent::BroadcastEvent(LobbyEvent_SetLoginNames);
// Disable controls that enable you to talk to TitanServers.
// The login button starts out disabled and enables itself when initialization
// finished successfully.
Container *aLobby = LobbyScreen::GetLobbyContainer();
if(aLobby==NULL)
return;
ControlIdSet aDisable;
aDisable.AddIds(ID_ShowCreateAccount,ID_ShowLostPassword,ID_ShowLostUserName);
aLobby->EnableControls(aDisable,false);
LobbyGlobal_LobbyMusic_Sound->SetLooping(true);
if(LobbyPersistentData::GetLobbyMusic())
LobbyGlobal_LobbyMusic_Sound->Play();
else
LobbyGlobal_LobbyMusic_Sound->Stop(); // in case music is already playing from the game
StartNetInit(false);
}