mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-22 22:45:48 +00:00
fix button for pause menu opening
This commit is contained in:
@@ -49,7 +49,7 @@ bool RAY::Window::open(void)
|
||||
}
|
||||
InitWindow(this->_dimensions.x, this->_dimensions.y, this->_title.c_str());
|
||||
this->_isOpen = true;
|
||||
//this->setExitKey(Controller::Keyboard::Key::KEY_M);
|
||||
this->setExitKey(Controller::Keyboard::Key::KEY_DELETE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace BBM
|
||||
//! @brief bomb key
|
||||
Key keyBomb = KEY_E;
|
||||
//! @brief pause key
|
||||
Key keyPause = KEY_M;
|
||||
Key keyPause = RAY::Controller::Keyboard::Key::KEY_ESCAPE;
|
||||
//! @brief move right key
|
||||
Key keyRight = KEY_A;
|
||||
//! @brief move left key
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace BBM
|
||||
return;
|
||||
gameState._loadedScenes[gameState.currentScene] = engine.scene;
|
||||
engine.scene = gameState._loadedScenes[gameState.nextScene];
|
||||
gameState.currentScene = gameState.nextScene;
|
||||
}
|
||||
|
||||
void Runner::addSystems(WAL::Wal &wal)
|
||||
@@ -210,9 +211,9 @@ namespace BBM
|
||||
scene->addEntity("background")
|
||||
.addComponent<PositionComponent>()
|
||||
.addComponent<Drawable2DComponent, RAY::Texture>("assets/plain_menu_background.png");
|
||||
scene->addEntity("logo")
|
||||
scene->addEntity("pause text")
|
||||
.addComponent<PositionComponent>(1920 / 3, 180, 0)
|
||||
.addComponent<Drawable2DComponent, RAY::Texture>("assets/logo_small.png");
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("PAUSE", 120, RAY::Vector2(), ORANGE);
|
||||
auto &play = scene->addEntity("play button")
|
||||
.addComponent<PositionComponent>(1920 / 2.5, 1080 - 540, 0)
|
||||
.addComponent<Drawable2DComponent, RAY::Texture>("assets/buttons/button_back.png")
|
||||
|
||||
Reference in New Issue
Block a user