mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
feat(PlayerDB): Added search button (#1579)
This commit is contained in:
parent
b44b2f04e6
commit
71960eddbb
@ -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\".");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user