Menu should now show the correct server IP instead of default.

Start of a StartMenu entity that will show when the game is started.
This commit is contained in:
Tleety
2016-03-09 14:34:02 +01:00
parent c9c462f695
commit 500ebfa08c
3 changed files with 92 additions and 4 deletions
+2 -2
View File
@@ -23,8 +23,8 @@ bool MainMenuSystem::OnButtonClick(const Events::ButtonClicked& e)
EntityWrapper serverIdentityEntity = entity.FirstParentWithComponent("ServerIdentity");
if(serverIdentityEntity.Valid()) {
Events::ConnectRequest event;
event.IP = (std::string)entity["ServerIdentity"]["IP"];
event.Port = (int)entity["ServerIdentity"]["Port"];
event.IP = (std::string)serverIdentityEntity["ServerIdentity"]["IP"];
event.Port = (int)serverIdentityEntity["ServerIdentity"]["Port"];
printf("\n ----Request Server Connect----\nIP: %s\nPort: %i\n ------------------------------", event.IP, event.Port);
m_EventBroker->Publish(event);
}