hotseatgame.cpp 761 B

1234567891011121314151617181920212223242526272829303132
  1. #include "hotseatgame/gui/hotseatgame.h"
  2. #include "ui_hotseatgame.h"
  3. #include "gui/guiscenemanager.h"
  4. #include <QDebug>
  5. HotSeatGame::HotSeatGame(QWidget *parent) :
  6. Scene(parent),
  7. ui(new Ui::HotSeatGame)
  8. {
  9. qDebug() << "Initialising game";
  10. ui->setupUi(this);
  11. setWindowState(Qt::WindowFullScreen);
  12. }
  13. void HotSeatGame::init() {
  14. GuiSceneManager::getInstance().hideMainWindow();
  15. }
  16. HotSeatGame::~HotSeatGame()
  17. {
  18. delete ui;
  19. }
  20. void HotSeatGame::on_surrender_button__clicked()
  21. {
  22. GuiSceneManager::getInstance().showMainWindow();
  23. GuiSceneManager::getInstance().hideDetachedScene("hotseatgame");
  24. //GuiSceneManager::getInstance().changeScene("hotseatgame_results");
  25. GuiSceneManager::getInstance().changeScene("main_menu");
  26. }