Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
- Add auto import runes
- Bump version
[build]
  • Loading branch information
BennyExtreme committed Dec 27, 2023
1 parent 8247f00 commit 29091dc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions KBotExt/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ struct Settings
int backupId = 0;
bool instantMute = false;
bool sideNotification = false;
bool autoImportRunes = false;
} gameTab;
};

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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())
{
Expand Down
15 changes: 14 additions & 1 deletion KBotExt/GameTab.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>(S.Window.width / 6));
if (ImGui::ComboAutoSelect("##comboInstalock", instalockComboData))
{
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -1063,6 +1073,9 @@ class GameTab
isPicked = true;
}
session.Patch();

if (S.gameTab.instalockEnabled == 1 && S.gameTab.autoImportRunes)
ChangeRunesOpgg();
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion KBotExt/Misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 29091dc

Please sign in to comment.