fix(Views/Player): not closing when the selected player left (#3039)

This commit is contained in:
Andreas Maerten 2024-05-03 18:53:59 +02:00 committed by GitHub
parent a7934ba357
commit d9576584f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,8 @@ namespace big
{ {
name_appendage += std::format(" [{}]", "TRUST"_T); name_appendage += std::format(" [{}]", "TRUST"_T);
} }
strcpy(player_tab.name, std::format("{} ({}){}", current_player->get_name(), current_player->id(), name_appendage).c_str()); strcpy(player_tab.name,
std::format("{} ({}){}", current_player->get_name(), current_player->id(), name_appendage).c_str());
view::player_info(); view::player_info();
ImGui::SameLine(); ImGui::SameLine();
@ -51,5 +52,7 @@ namespace big
ImGui::SameLine(); ImGui::SameLine();
view::player_vehicle(); view::player_vehicle();
} }
else
g_gui_service->set_selected(tabs::NONE);
} }
} }