From 0dd40574a016c207ff9dfdc1430d89a2bc0b0f2b Mon Sep 17 00:00:00 2001 From: Yimura Date: Sat, 18 Sep 2021 22:12:37 +0200 Subject: [PATCH] feat(HandlingSearch): Disable keyboard, use thread pool and show active profile --- .../src/gui/window/handling/handling_search.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/BigBaseV2/src/gui/window/handling/handling_search.cpp b/BigBaseV2/src/gui/window/handling/handling_search.cpp index 15ce28ae..a2db404c 100644 --- a/BigBaseV2/src/gui/window/handling/handling_search.cpp +++ b/BigBaseV2/src/gui/window/handling/handling_search.cpp @@ -1,5 +1,8 @@ #include "fiber_pool.hpp" #include "handling_tabs.hpp" +#include "natives.hpp" +#include "script.hpp" +#include "thread_pool.hpp" namespace big { @@ -7,11 +10,16 @@ namespace big { if (ImGui::BeginTabItem("Search")) { + QUEUE_JOB_BEGIN_CLAUSE() + { + PAD::DISABLE_ALL_CONTROL_ACTIONS(0); + }QUEUE_JOB_END_CLAUSE + static char search[13]; ImGui::InputTextWithHint("##search_share_code", "Search by share code", search, sizeof(search)); ImGui::SameLine(); 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) { @@ -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()) { 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::Text("Name:");