mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-06 03:12:01 +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());
|
InitWindow(this->_dimensions.x, this->_dimensions.y, this->_title.c_str());
|
||||||
this->_isOpen = true;
|
this->_isOpen = true;
|
||||||
//this->setExitKey(Controller::Keyboard::Key::KEY_M);
|
this->setExitKey(Controller::Keyboard::Key::KEY_DELETE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace BBM
|
|||||||
//! @brief bomb key
|
//! @brief bomb key
|
||||||
Key keyBomb = KEY_E;
|
Key keyBomb = KEY_E;
|
||||||
//! @brief pause key
|
//! @brief pause key
|
||||||
Key keyPause = KEY_M;
|
Key keyPause = RAY::Controller::Keyboard::Key::KEY_ESCAPE;
|
||||||
//! @brief move right key
|
//! @brief move right key
|
||||||
Key keyRight = KEY_A;
|
Key keyRight = KEY_A;
|
||||||
//! @brief move left key
|
//! @brief move left key
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ namespace BBM
|
|||||||
return;
|
return;
|
||||||
gameState._loadedScenes[gameState.currentScene] = engine.scene;
|
gameState._loadedScenes[gameState.currentScene] = engine.scene;
|
||||||
engine.scene = gameState._loadedScenes[gameState.nextScene];
|
engine.scene = gameState._loadedScenes[gameState.nextScene];
|
||||||
|
gameState.currentScene = gameState.nextScene;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Runner::addSystems(WAL::Wal &wal)
|
void Runner::addSystems(WAL::Wal &wal)
|
||||||
@@ -210,9 +211,9 @@ namespace BBM
|
|||||||
scene->addEntity("background")
|
scene->addEntity("background")
|
||||||
.addComponent<PositionComponent>()
|
.addComponent<PositionComponent>()
|
||||||
.addComponent<Drawable2DComponent, RAY::Texture>("assets/plain_menu_background.png");
|
.addComponent<Drawable2DComponent, RAY::Texture>("assets/plain_menu_background.png");
|
||||||
scene->addEntity("logo")
|
scene->addEntity("pause text")
|
||||||
.addComponent<PositionComponent>(1920 / 3, 180, 0)
|
.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")
|
auto &play = scene->addEntity("play button")
|
||||||
.addComponent<PositionComponent>(1920 / 2.5, 1080 - 540, 0)
|
.addComponent<PositionComponent>(1920 / 2.5, 1080 - 540, 0)
|
||||||
.addComponent<Drawable2DComponent, RAY::Texture>("assets/buttons/button_back.png")
|
.addComponent<Drawable2DComponent, RAY::Texture>("assets/buttons/button_back.png")
|
||||||
|
|||||||
Reference in New Issue
Block a user