diff --git a/src/views/network/view_player_database.cpp b/src/views/network/view_player_database.cpp index 4f00f1b8..125294c7 100644 --- a/src/views/network/view_player_database.cpp +++ b/src/views/network/view_player_database.cpp @@ -241,5 +241,20 @@ namespace big current_player = g_player_database_service->add_player(new_rockstar_id, new_name); g_player_database_service->save(); } + ImGui::SameLine(); + if (ImGui::Button("SEARCH"_T.data())) + { + g_thread_pool->push([]{ + if (!g_api_service->get_rid_from_username(new_name, *(uint64_t*)&new_rockstar_id)) + { + g_notification_service->push_error("New Player DB Entry", std::format("No user '{}' called could be found.", new_name)); + new_rockstar_id = 0; + } + }); + } + if (ImGui::IsItemHovered()) + { + ImGui::SetTooltip("Do you know only the name of someone and not their Rockstar ID? Just fill in the username and click \"search\"."); + } } }