trying to make battery dialog
This commit is contained in:
1 parent
112be9bb0c
commit
5e7c274645
4 files changed
+5
-2
No files matched your search
@@ -283,7 +283,7 @@ void GameObjectManager::handleEvent(const SDL_Event& event) {
|
|||||||
}
|
}
|
||||||
if (isBatteryDialogActive) {
|
if (isBatteryDialogActive) {
|
||||||
BatteryDialogIndex++;
|
BatteryDialogIndex++;
|
||||||
if (BatteryDialogIndex < batteryDialogTextures.size()) {
|
if (BatteryDialogIndex <= batteryDialogTextures.size()) {
|
||||||
batteryDialogTexturePtr = std::make_shared<Texture>(CreateTextureDataFromBmp24(batteryDialogTextures[BatteryDialogIndex]));
|
batteryDialogTexturePtr = std::make_shared<Texture>(CreateTextureDataFromBmp24(batteryDialogTextures[BatteryDialogIndex]));
|
||||||
} else {
|
} else {
|
||||||
isBatteryDialogActive = false;
|
isBatteryDialogActive = false;
|
||||||
|
|||||||
+1
-1
@@ -88,7 +88,7 @@ public:
|
|||||||
ZL::VertexRenderStruct monsterScreenMeshMutable;
|
ZL::VertexRenderStruct monsterScreenMeshMutable;
|
||||||
|
|
||||||
std::vector<std::string> dialogTextures = { // Список диалогов
|
std::vector<std::string> dialogTextures = { // Список диалогов
|
||||||
"./start_dialog.bmp",
|
"./photo.bmp",
|
||||||
"./next_dialog.bmp",
|
"./next_dialog.bmp",
|
||||||
"./final_dialog.bmp",
|
"./final_dialog.bmp",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -221,6 +221,8 @@ void RenderSystem::drawUI(const GameObjectManager& gameObjects) {
|
|||||||
renderer.DrawVertexRenderStruct(gameObjects.inventoryIconMeshMutable); // Используем 2D меш инвентаря
|
renderer.DrawVertexRenderStruct(gameObjects.inventoryIconMeshMutable); // Используем 2D меш инвентаря
|
||||||
renderer.PopMatrix();
|
renderer.PopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Отрисовка диалогового окна батарейки
|
||||||
if (gameObjects.isBatteryDialogActive && gameObjects.batteryDialogTexturePtr) {
|
if (gameObjects.isBatteryDialogActive && gameObjects.batteryDialogTexturePtr) {
|
||||||
renderer.PushMatrix();
|
renderer.PushMatrix();
|
||||||
float xPos = Environment::width / 2.0f - 250; // Центрируем
|
float xPos = Environment::width / 2.0f - 250; // Центрируем
|
||||||
@@ -232,6 +234,7 @@ void RenderSystem::drawUI(const GameObjectManager& gameObjects) {
|
|||||||
renderer.PopMatrix();
|
renderer.PopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//for (const auto* ao : gameObjects.aoMgr.findByHighlighted(true)) {
|
//for (const auto* ao : gameObjects.aoMgr.findByHighlighted(true)) {
|
||||||
for (auto& ao : gameObjects.rooms[gameObjects.current_room_index].findByHighlighted(true)) {
|
for (auto& ao : gameObjects.rooms[gameObjects.current_room_index].findByHighlighted(true)) {
|
||||||
std::cout << ao->name << std::endl;
|
std::cout << ao->name << std::endl;
|
||||||
|
|||||||
Reference in new issue
Block a user