Skip to content

Commit

Permalink
labelled teams
Browse files Browse the repository at this point in the history
  • Loading branch information
typedeck0 authored Mar 4, 2023
1 parent 57d0c4f commit 141e13a
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion know_thy_enemy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,25 @@ void imgui_team_combatants(std::pair<uint16_t, std::vector<id_umap>> team)
ImGui::PopStyleColor();
}

void add_new_team_name(uint16_t team_id)
{
switch (team_id)
{
case 432:
strings.push_back("Blue");
break;
case 2739:
strings.push_back("Green");
break;
case 705:
strings.push_back("Red");
break;
default:
new_string_int("Team %d", team_id);
break;
}
}

uintptr_t imgui_proc(uint32_t not_charsel_or_loading, uint32_t hide_if_combat_or_ooc)
{
if (not_charsel_or_loading && enabled)
Expand All @@ -617,7 +636,7 @@ uintptr_t imgui_proc(uint32_t not_charsel_or_loading, uint32_t hide_if_combat_or
std::lock_guard<std::mutex>lock(mtx);
for (auto team : history)
{
new_string_int("Team %d", team.first);
add_new_team_name(team.first);
if (ImGui::BeginTabItem(strings.back().c_str()))
{
imgui_team_combatants(team);
Expand Down

0 comments on commit 141e13a

Please sign in to comment.