diff --git a/KBotExt/Config.h b/KBotExt/Config.h index 394144c..29aa78d 100644 --- a/KBotExt/Config.h +++ b/KBotExt/Config.h @@ -65,6 +65,7 @@ struct Settings { size_t indexFirstRole = 0; size_t indexSecondRole = 0; + bool autoMultiSearch = false; size_t indexMultiSearch = 0; bool autoAcceptEnabled = false; int instalockEnabled = 0; @@ -134,6 +135,7 @@ class Config root["gameTab"]["indexFirstRole"] = S.gameTab.indexFirstRole; root["gameTab"]["indexSecondRole"] = S.gameTab.indexSecondRole; + root["gameTab"]["autoMultiSearch"] = S.gameTab.autoMultiSearch; root["gameTab"]["indexMultiSearch"] = S.gameTab.indexMultiSearch; root["gameTab"]["autoAcceptEnabled"] = S.gameTab.autoAcceptEnabled; root["gameTab"]["instalockEnabled"] = S.gameTab.instalockEnabled; @@ -228,6 +230,8 @@ class Config S.gameTab.indexFirstRole = t.asUInt(); if (auto t = root["gameTab"]["indexSecondRole"]; !t.empty()) S.gameTab.indexSecondRole = t.asUInt(); + if (auto t = root["gameTab"]["autoMultiSearch"]; !t.empty()) + S.gameTab.autoMultiSearch = t.asBool(); if (auto t = root["gameTab"]["indexMultiSearch"]; !t.empty()) S.gameTab.indexMultiSearch = t.asUInt(); if (auto t = root["gameTab"]["autoAcceptEnabled"]; !t.empty()) diff --git a/KBotExt/GameTab.h b/KBotExt/GameTab.h index d51e085..af79554 100644 --- a/KBotExt/GameTab.h +++ b/KBotExt/GameTab.h @@ -394,7 +394,9 @@ class GameTab "OP.GG", "U.GG", "PORO.GG", "Porofessor.gg" }; const char* selectedMultiSearch = itemsMultiSearch[S.gameTab.indexMultiSearch].c_str(); - + + ImGui::Checkbox("Auto", &S.gameTab.autoMultiSearch); + ImGui::SameLine(); if (ImGui::Button("Multi-Search")) { result = MultiSearch(itemsMultiSearch[S.gameTab.indexMultiSearch]); @@ -1018,6 +1020,13 @@ class GameTab std::thread instantMessageThread(&GameTab::InstantMessage, S.gameTab.instantMute, S.gameTab.sideNotification); instantMessageThread.detach(); } + + if (S.gameTab.autoMultiSearch) { + static std::vector itemsMultiSearch = { + "OP.GG", "U.GG", "PORO.GG", "Porofessor.gg" + }; + MultiSearch(itemsMultiSearch[S.gameTab.indexMultiSearch]); + } } if ((S.gameTab.instalockEnabled != 0 || S.gameTab.autoBanId) && !isPicked) diff --git a/KBotExt/Misc.h b/KBotExt/Misc.h index b659f1f..cb1f2d1 100644 --- a/KBotExt/Misc.h +++ b/KBotExt/Misc.h @@ -20,7 +20,7 @@ class Misc { public: - static inline std::string programVersion = "1.4.9"; + static inline std::string programVersion = "1.5.0"; static inline std::string latestVersion; static bool LaunchClient(const std::string& args)