feat: don't show tile select when tooltip
This commit is contained in:
@@ -21,6 +21,7 @@ public:
|
|||||||
virtual void render();
|
virtual void render();
|
||||||
|
|
||||||
void setCastle(const game::TeamCastle* castle) { m_Castle = castle; }
|
void setCastle(const game::TeamCastle* castle) { m_Castle = castle; }
|
||||||
|
bool isShown() { return m_Castle != nullptr; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace gui
|
} // namespace gui
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public:
|
|||||||
virtual void render();
|
virtual void render();
|
||||||
|
|
||||||
void setMob(const game::Mob* mob) { m_Mob = mob; }
|
void setMob(const game::Mob* mob) { m_Mob = mob; }
|
||||||
|
bool isShown() { return m_Mob != nullptr; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace gui
|
} // namespace gui
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ void WorldRenderer::renderTowers() const {
|
|||||||
void WorldRenderer::renderTileSelect() const {
|
void WorldRenderer::renderTileSelect() const {
|
||||||
if (ImGui::IsAnyItemHovered()) return;
|
if (ImGui::IsAnyItemHovered()) return;
|
||||||
|
|
||||||
|
if(m_MobTooltip->isShown() || m_CastleTooltip->isShown()) return;
|
||||||
|
|
||||||
Renderer::Model tileSelectModel;
|
Renderer::Model tileSelectModel;
|
||||||
tileSelectModel.vao = m_SelectTileVao.get();
|
tileSelectModel.vao = m_SelectTileVao.get();
|
||||||
tileSelectModel.positon = { (int)m_CursorPos.x, (int)m_CursorPos.y };
|
tileSelectModel.positon = { (int)m_CursorPos.x, (int)m_CursorPos.y };
|
||||||
|
|||||||
Reference in New Issue
Block a user