Added #define to disable the online login for now. Makes it easier
to start and debug LAN play.
This commit is contained in:
parent
afac848bb9
commit
40bdb4d777
@ -513,16 +513,22 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
|||||||
"\"Connect to the Internet\"."));
|
"\"Connect to the Internet\"."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Define this to require a login to the stk server (default behaviour)
|
||||||
|
// Undefine for testing LAN only.
|
||||||
|
#undef REQUIRE_LOGIN
|
||||||
|
#ifdef REQUIRE_LOGIN
|
||||||
if (PlayerManager::getCurrentOnlineId())
|
if (PlayerManager::getCurrentOnlineId())
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId());
|
ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId());
|
||||||
OnlineProfileServers::getInstance()->push();
|
OnlineProfileServers::getInstance()->push();
|
||||||
}
|
}
|
||||||
|
#ifdef REQUIRE_LOGIN
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UserScreen::getInstance()->push();
|
UserScreen::getInstance()->push();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (selection == "addons")
|
else if (selection == "addons")
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,12 @@ OnlineProfileServers::OnlineProfileServers() : OnlineProfileBase("online/profile
|
|||||||
void OnlineProfileServers::loadedFromFile()
|
void OnlineProfileServers::loadedFromFile()
|
||||||
{
|
{
|
||||||
OnlineProfileBase::loadedFromFile();
|
OnlineProfileBase::loadedFromFile();
|
||||||
|
if (!PlayerManager::getCurrentOnlineId())
|
||||||
|
{
|
||||||
|
getWidget<IconButtonWidget>("find_wan_server")->setActive(false);
|
||||||
|
getWidget<IconButtonWidget>("create_wan_server")->setActive(false);
|
||||||
|
getWidget<IconButtonWidget>("quick_wan_play")->setActive(false);
|
||||||
|
}
|
||||||
} // loadedFromFile
|
} // loadedFromFile
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user