diff --git a/KBotExt/Config.h b/KBotExt/Config.h index bb137e3..394144c 100644 --- a/KBotExt/Config.h +++ b/KBotExt/Config.h @@ -80,6 +80,7 @@ struct Settings int backupId = 0; bool instantMute = false; bool sideNotification = false; + bool autoImportRunes = false; } gameTab; }; @@ -148,6 +149,7 @@ class Config root["gameTab"]["backupId"] = S.gameTab.backupId; root["gameTab"]["instantMute"] = S.gameTab.instantMute; root["gameTab"]["sideNotification"] = S.gameTab.sideNotification; + root["gameTab"]["autoImportRunes"] = S.gameTab.autoImportRunes; { root["ignoredVersions"] = Json::Value(Json::arrayValue); @@ -256,6 +258,8 @@ class Config S.gameTab.instantMute = t.asBool(); if (auto t = root["gameTab"]["sideNotification"]; !t.empty()) S.gameTab.sideNotification = t.asBool(); + if (auto t = root["gameTab"]["autoImportRunes"]; !t.empty()) + S.gameTab.autoImportRunes = t.asBool(); if (root["ignoredVersions"].isArray() && !root["ignoredVersions"].empty()) { diff --git a/KBotExt/GameTab.h b/KBotExt/GameTab.h index 69f4bc9..d51e085 100644 --- a/KBotExt/GameTab.h +++ b/KBotExt/GameTab.h @@ -599,12 +599,16 @@ class GameTab } } + ImGui::Columns(1); + ImGui::RadioButton("Off", &S.gameTab.instalockEnabled, 0); ImGui::SameLine(); ImGui::RadioButton("Instalock", &S.gameTab.instalockEnabled, 1); ImGui::SameLine(); ImGui::RadioButton("Instapick", &S.gameTab.instalockEnabled, 2); - ImGui::SameLine(); + + ImGui::Columns(1); + ImGui::SetNextItemWidth(static_cast(S.Window.width / 6)); if (ImGui::ComboAutoSelect("##comboInstalock", instalockComboData)) { @@ -633,6 +637,12 @@ class GameTab ImGui::SameLine(); + ImGui::Checkbox("Auto import runes", &S.gameTab.autoImportRunes); + ImGui::SameLine(); + ImGui::HelpMarker("Works only with Instalock"); + + ImGui::SameLine(); + ImGui::Checkbox("Dodge on champion ban", &S.gameTab.dodgeOnBan); ImGui::SameLine(); @@ -1063,6 +1073,9 @@ class GameTab isPicked = true; } session.Patch(); + + if (S.gameTab.instalockEnabled == 1 && S.gameTab.autoImportRunes) + ChangeRunesOpgg(); } } else diff --git a/KBotExt/Misc.h b/KBotExt/Misc.h index bd1c9e4..b659f1f 100644 --- a/KBotExt/Misc.h +++ b/KBotExt/Misc.h @@ -20,7 +20,7 @@ class Misc { public: - static inline std::string programVersion = "1.4.8"; + static inline std::string programVersion = "1.4.9"; static inline std::string latestVersion; static bool LaunchClient(const std::string& args)