mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-05 17:13:29 +08:00
feat(HandlingSearch): Disable keyboard, use thread pool and show active profile
This commit is contained in:
parent
5c9ea77dc4
commit
42bad537ec
@ -1,5 +1,8 @@
|
|||||||
#include "fiber_pool.hpp"
|
#include "fiber_pool.hpp"
|
||||||
#include "handling_tabs.hpp"
|
#include "handling_tabs.hpp"
|
||||||
|
#include "natives.hpp"
|
||||||
|
#include "script.hpp"
|
||||||
|
#include "thread_pool.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
@ -7,11 +10,16 @@ namespace big
|
|||||||
{
|
{
|
||||||
if (ImGui::BeginTabItem("Search"))
|
if (ImGui::BeginTabItem("Search"))
|
||||||
{
|
{
|
||||||
|
QUEUE_JOB_BEGIN_CLAUSE()
|
||||||
|
{
|
||||||
|
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||||
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
|
||||||
static char search[13];
|
static char search[13];
|
||||||
ImGui::InputTextWithHint("##search_share_code", "Search by share code", search, sizeof(search));
|
ImGui::InputTextWithHint("##search_share_code", "Search by share code", search, sizeof(search));
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button("Search"))
|
if (ImGui::Button("Search"))
|
||||||
g_fiber_pool->queue_job([&] { g_vehicle_service->get_by_share_code(search); });
|
g_thread_pool->push([&] { g_vehicle_service->get_by_share_code(search); });
|
||||||
|
|
||||||
switch (g_vehicle_service->m_search_status)
|
switch (g_vehicle_service->m_search_status)
|
||||||
{
|
{
|
||||||
@ -31,6 +39,10 @@ namespace big
|
|||||||
if (auto it = g_vehicle_service->m_handling_profiles.find(search); it != g_vehicle_service->m_handling_profiles.end())
|
if (auto it = g_vehicle_service->m_handling_profiles.find(search); it != g_vehicle_service->m_handling_profiles.end())
|
||||||
{
|
{
|
||||||
auto& profile = it->second;
|
auto& profile = it->second;
|
||||||
|
|
||||||
|
if (profile.share_code == g_vehicle_service->get_active_profile(profile.handling_hash))
|
||||||
|
ImGui::TextColored({ 0.1254f,0.8039f,0.3137f,1.f }, "Active");
|
||||||
|
|
||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
ImGui::Text("Name:");
|
ImGui::Text("Name:");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user