void Bomberman::MainMenuPlaySolo::update(const gdl::GameClock &, gdl::Input &input) { Bomberman::Sound::getInstance()->playTrack(Bomberman::T_MENU); this->_width = this->_game->getWindow().getWidth(); this->_height = this->_game->getWindow().getHeight(); if (KeyHandler::handle(input, gdl::Keys::Escape)) this->_game->getWindow().close(); if (KeyHandler::handle(input, gdl::Mouse::Left)) { int x = input.getMousePositionX(); int y = input.getMousePositionY(); manageNbrPlayers(x, y); manageSelectMap(x, y); if ((x >= getRealPosX(100) && x < getRealPosX(360)) && (y >= getRealPosY(535) && y <= getRealPosY(555))) this->startNewGame(); if ((x >= getRealPosX(30) && x <= getRealPosX(200))) { int tmp = 335; int i = 0; while (tmp <= 435) { if (y >= getRealPosY(tmp) && y <= getRealPosY(tmp + 10)) getSelected(i); tmp += 20; i++; } } if ((x >= getRealPosX(405) && x <= getRealPosX(650)) && (y >= getRealPosY(535) && y <= getRealPosY(556))) this->_game->setCurrentView(new Bomberman::MainMenuLoadGame(this->_game)); if ((x >= getRealPosX(690) && x <= getRealPosX(790)) && (y >= getRealPosY(24) && y <= getRealPosY(43))) this->_game->setCurrentView(new Bomberman::MainMenuCredit(this->_game)); } this->getInputKeyboard(input); }