feat: add place tower buttons

This commit is contained in:
2021-11-19 17:53:15 +01:00
parent 487741e95c
commit 908abe1b14

View File

@@ -44,7 +44,10 @@ void TowerPlacePopup::render() {
ImGui::SetCursorPosY(m_TowerPopupTileHeight - m_PlaceTowerButtonHeight - 10); ImGui::SetCursorPosY(m_TowerPopupTileHeight - m_PlaceTowerButtonHeight - 10);
ImGui::SetCursorPosX(m_TowerPopupTileWidth / 2.0f - m_PlaceTowerButtonWidth / 2.0f); ImGui::SetCursorPosX(m_TowerPopupTileWidth / 2.0f - m_PlaceTowerButtonWidth / 2.0f);
ImGui::Button(buyText.c_str(), ImVec2(m_PlaceTowerButtonWidth, m_PlaceTowerButtonHeight)); if(ImGui::Button(buyText.c_str(), ImVec2(m_PlaceTowerButtonWidth, m_PlaceTowerButtonHeight))){
getClient()->placeTower(towerType, m_ClickWorldPos);
ImGui::CloseCurrentPopup();
}
ImGui::EndChild(); ImGui::EndChild();
} }