feat(PlayerDB): Added search button (#1579)
This commit is contained in:
parent
a4d623ca74
commit
7c927e0cfb
@ -241,5 +241,20 @@ namespace big
|
|||||||
current_player = g_player_database_service->add_player(new_rockstar_id, new_name);
|
current_player = g_player_database_service->add_player(new_rockstar_id, new_name);
|
||||||
g_player_database_service->save();
|
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\".");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user