void MainMenuScreen::checkInput() { SDL_Event evnt; while (SDL_PollEvent(&evnt)) { m_gui.onSDLEvent(evnt); switch (evnt.type) { case SDL_QUIT: onExitClicked(CEGUI::EventArgs()); break; } } }
WaitJoinDialog::WaitJoinDialog(const GameTable& gameTable, QWidget *parent): MyDialog(parent), mJoined(false) { qDebug() << "WaitJoinDialog::WaitJoinDialog"; label = new QLabel(tr("You have created the game:") + "\n\n" + tr("Bet (RUR): ") + QString::number(gameTable.bet) + "\n" + tr("Move time (min)") + ": " + QString::number(gameTable.time2step/SECONDS_IN_MINUTE) + "\n" + tr("Game time (min)") + ": " + QString::number(gameTable.time2game/SECONDS_IN_MINUTE) + "\n\n" + tr("Please wait until an opponent joins your game..."), this); label->setWordWrap(true); exitButton = new QPushButton(tr("Exit"), this); connect(exitButton, SIGNAL(clicked()), this, SLOT(onExitClicked())); layout = new QVBoxLayout(this); layout->addWidget(label); layout->addWidget(exitButton); this->setLayout(layout); connect(Client::instance(), SIGNAL(opponentJoined(const Player&)), this, SLOT(onOpponentJoined(const Player&))); qDebug() << "connect 'opponentJoined' to WaitJoinDialog::onOpponentJoined (constructor)"; }