extra callback for showing internet game login dialog
This commit is contained in:
@@ -81,7 +81,7 @@ public:
|
||||
virtual void riverAnimation2()=0;
|
||||
|
||||
virtual void postRiverAnimation1()=0;
|
||||
virtual void postRiverRunAnimation1()=0;
|
||||
virtual void postRiverRunAnimation1()=0;
|
||||
virtual void flipHolecardsAllIn()=0;
|
||||
|
||||
virtual void nextRoundCleanGui()=0;
|
||||
|
||||
@@ -126,6 +126,7 @@ void GuiWrapper::flushLogAtHand() { myLog->signalFlushLogAtHand(); }
|
||||
void GuiWrapper::SignalNetClientConnect(int actionID) { myStartWindow->signalNetClientConnect(actionID); }
|
||||
void GuiWrapper::SignalNetClientServerListAdd(unsigned serverId) { myStartWindow->signalNetClientServerListAdd(serverId); }
|
||||
void GuiWrapper::SignalNetClientServerListShow() { myStartWindow->signalNetClientServerListShow(); }
|
||||
void GuiWrapper::SignalNetClientLoginShow() { myStartWindow->signalNetClientLoginShow(); }
|
||||
void GuiWrapper::SignalNetClientServerListClear() { myStartWindow->signalNetClientServerListClear(); }
|
||||
void GuiWrapper::SignalNetClientGameInfo(int actionID) { myStartWindow->signalNetClientGameInfo(actionID); }
|
||||
void GuiWrapper::SignalNetClientError(int errorID, int osErrorID) { myStartWindow->signalNetClientError(errorID, osErrorID); }
|
||||
|
||||
@@ -115,6 +115,7 @@ public:
|
||||
void SignalNetClientServerListAdd(unsigned serverId);
|
||||
void SignalNetClientServerListShow();
|
||||
void SignalNetClientServerListClear();
|
||||
void SignalNetClientLoginShow();
|
||||
void SignalNetClientGameInfo(int actionID);
|
||||
void SignalNetClientError(int errorID, int osErrorID);
|
||||
void SignalNetClientNotification(int notificationId);
|
||||
|
||||
@@ -62,7 +62,6 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
|
||||
// myGuiInterface->setSession(session);
|
||||
}
|
||||
|
||||
|
||||
// #ifdef __APPLE__
|
||||
// setWindowModality(Qt::ApplicationModal);
|
||||
// setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
|
||||
@@ -120,6 +119,8 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
|
||||
connect(this, SIGNAL(signalNetClientServerListClear()), myServerListDialog, SLOT(clearList()));
|
||||
connect(this, SIGNAL(signalNetClientServerListAdd(unsigned)), myServerListDialog, SLOT(addServerItem(unsigned)));
|
||||
|
||||
connect(this, SIGNAL(signalNetClientLoginShow()), this, SLOT(callInternetGameLoginDialog()));
|
||||
|
||||
connect(this, SIGNAL(signalNetClientSelfJoined(unsigned, QString, int)), myStartNetworkGameDialog, SLOT(joinedNetworkGame(unsigned, QString, int)));
|
||||
connect(this, SIGNAL(signalNetClientPlayerJoined(unsigned, QString, int)), myStartNetworkGameDialog, SLOT(addConnectedPlayer(unsigned, QString, int)));
|
||||
connect(this, SIGNAL(signalNetClientPlayerChanged(unsigned, QString)), myStartNetworkGameDialog, SLOT(updatePlayer(unsigned, QString)));
|
||||
@@ -312,21 +313,32 @@ void startWindowImpl::joinGameLobby() {
|
||||
// Clear Lobby dialog.
|
||||
myGameLobbyDialog->clearDialog();
|
||||
|
||||
//start internet client with config values for user and pw TODO
|
||||
mySession->startInternetClient();
|
||||
|
||||
//Dialog mit Statusbalken
|
||||
myConnectToServerDialog->exec();
|
||||
if (myConnectToServerDialog->result() == QDialog::Accepted ) {
|
||||
showLobbyDialog();
|
||||
}
|
||||
else {
|
||||
mySession->terminateNetworkClient();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void startWindowImpl::callInternetGameLoginDialog() {
|
||||
|
||||
//login
|
||||
myInternetGameLoginDialog->exec();
|
||||
if(myInternetGameLoginDialog->result() == QDialog::Accepted) {
|
||||
//send login infos
|
||||
mySession->startInternetClient(std::string(myInternetGameLoginDialog->lineEdit_username->text().toUtf8().constData()), std::string(myInternetGameLoginDialog->lineEdit_password->text().toUtf8().constData()));
|
||||
|
||||
//Dialog mit Statusbalken
|
||||
myConnectToServerDialog->exec();
|
||||
if (myConnectToServerDialog->result() == QDialog::Accepted ) {
|
||||
showLobbyDialog();
|
||||
}
|
||||
else {
|
||||
mySession->terminateNetworkClient();
|
||||
}
|
||||
// mySession->
|
||||
}
|
||||
else {
|
||||
myConnectToServerDialog->reject();
|
||||
mySession->terminateNetworkClient();
|
||||
}
|
||||
}
|
||||
|
||||
void startWindowImpl::callCreateNetworkGameDialog() {
|
||||
|
||||
@@ -65,6 +65,7 @@ signals:
|
||||
void signalNetClientServerListShow();
|
||||
void signalNetClientServerListClear();
|
||||
void signalNetClientServerListAdd(unsigned serverId);
|
||||
void signalNetClientLoginShow();
|
||||
void signalNetClientGameInfo(int actionID);
|
||||
void signalNetClientError(int errorID, int osErrorID);
|
||||
void signalNetClientNotification(int notificationId);
|
||||
@@ -110,6 +111,7 @@ public slots:
|
||||
void callCreateNetworkGameDialog();
|
||||
void callJoinNetworkGameDialog();
|
||||
void showLobbyDialog();
|
||||
void callInternetGameLoginDialog();
|
||||
void joinGameLobby();
|
||||
void showClientDialog();
|
||||
void showNetworkStartDialog();
|
||||
|
||||
Reference in New Issue
Block a user