#include "render/gui/CastleTooltip.h"
#include "render/gui/imgui/imgui.h"

#include "render/WorldRenderer.h"

#include "game/client/Client.h"

namespace td {
namespace gui {

CastleTooltip::CastleTooltip(client::Client* client) : GuiWidget(client) {

}

void CastleTooltip::Render() {
    if (m_Castle == nullptr) return;

    ImGui::BeginTooltip();
    ImGui::PushStyleColor(ImGuiCol_Text, render::WorldRenderer::GetImGuiTeamColor(m_Castle->GetTeam()->GetColor()));
    ImGui::Text("Castle : ");
    ImGui::PopStyleColor();
    ImGui::Text("\tCastle HP : %i/%i", static_cast<int>(m_Castle->GetLife()), game::TeamCastle::CastleMaxLife);
    ImGui::EndTooltip();
}

} // namespace gui
} // namespace td
