playervsplayerintro.cpp 720 B

123456789101112131415161718192021222324252627282930
  1. #include "gui/playervsplayerintro.h"
  2. #include "gui/guiscenemanager.h"
  3. #include "playermanager.h"
  4. #include "gui/scene.h"
  5. #include "ui_playervsplayerintro.h"
  6. PlayerVsPlayerIntro::PlayerVsPlayerIntro(QWidget *parent) :
  7. Scene(parent),
  8. ui(new Ui::PlayerVsPlayerIntro)
  9. {
  10. ui->setupUi(this);
  11. }
  12. PlayerVsPlayerIntro::~PlayerVsPlayerIntro()
  13. {
  14. delete ui;
  15. }
  16. void PlayerVsPlayerIntro::on_back_to_menu_clicked()
  17. {
  18. GuiSceneManager::getInstance().changeScene("main_menu");
  19. }
  20. void PlayerVsPlayerIntro::on_go_next_clicked()
  21. {
  22. PlayerManager::getInstance().setPlayersNum(2);
  23. /// TODO - Check if money input correct
  24. GuiSceneManager::getInstance().changeScene("recruit_army", "1|" + ui->money_->text());
  25. }