refactor: add identation

This commit is contained in:
2021-11-12 19:57:04 +01:00
parent 830cb061e2
commit 66e0a0373f

View File

@@ -15,26 +15,26 @@ MobTooltip::MobTooltip(client::Client* client) : GuiWidget(client) {
} }
void MobTooltip::render() { void MobTooltip::render() {
if(m_Mob == nullptr) return; if (m_Mob == nullptr) return;
const game::Player& sender = getClient()->getGame().getPlayerById(m_Mob->getSender()); const game::Player& sender = getClient()->getGame().getPlayerById(m_Mob->getSender());
ImGui::BeginTooltip(); ImGui::BeginTooltip();
ImGui::Text("Sender :"); ImGui::Text("Sender :");
ImGui::SameLine(); ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, render::WorldRenderer::getImGuiTeamColor(sender.getTeamColor())); ImGui::PushStyleColor(ImGuiCol_Text, render::WorldRenderer::getImGuiTeamColor(sender.getTeamColor()));
ImGui::Text("%s", sender.getName().c_str()); ImGui::Text("%s", sender.getName().c_str());
ImGui::PopStyleColor(); ImGui::PopStyleColor();
ImGui::Text("Mob HP : %.1f/%i", m_Mob->getHealth(), m_Mob->getStats()->getMaxLife()); ImGui::Text("Mob HP : %.1f/%i", m_Mob->getHealth(), m_Mob->getStats()->getMaxLife());
ImGui::Text("Mob Type : %s", game::MobFactory::getMobName(m_Mob->getType()).c_str()); ImGui::Text("Mob Type : %s", game::MobFactory::getMobName(m_Mob->getType()).c_str());
ImGui::Text("Mob Level : %i", m_Mob->getLevel()); ImGui::Text("Mob Level : %i", m_Mob->getLevel());
ImGui::NewLine(); ImGui::NewLine();
ImGui::Text("Mob Stats :"); ImGui::Text("Mob Stats :");
ImGui::Text("\tMax health : %i", m_Mob->getStats()->getMaxLife()); ImGui::Text("\tMax health : %i", m_Mob->getStats()->getMaxLife());
ImGui::Text("\tSpeed : %.1f", m_Mob->getStats()->getMovementSpeed()); ImGui::Text("\tSpeed : %.1f", m_Mob->getStats()->getMovementSpeed());
ImGui::Text("\tDamage : %.1f", m_Mob->getStats()->getDamage()); ImGui::Text("\tDamage : %.1f", m_Mob->getStats()->getDamage());
ImGui::Text("\tMoney cost : %i", m_Mob->getStats()->getMoneyCost()); ImGui::Text("\tMoney cost : %i", m_Mob->getStats()->getMoneyCost());
ImGui::Text("\tEXP cost : %i", m_Mob->getStats()->getExpCost()); ImGui::Text("\tEXP cost : %i", m_Mob->getStats()->getExpCost());
ImGui::Text("\tEXP reward : %i", m_Mob->getStats()->getExpReward()); ImGui::Text("\tEXP reward : %i", m_Mob->getStats()->getExpReward());
ImGui::EndTooltip(); ImGui::EndTooltip();
} }