Skip to content

Commit be0fcec

Browse files
committed
small fix
1 parent 47b5044 commit be0fcec

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

KBotExt/GameTab.h

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,17 @@ class GameTab
351351

352352
ImGui::Columns(1);
353353

354-
std::string chosenInstalock = "Instalock champ \t\tChosen: " + Misc::ChampIdToName(S.gameTab.instalockId) + "###AnimatedInstalock";
354+
static bool isStillDownloading = true;
355+
if (!champSkins.empty())
356+
isStillDownloading = false;
357+
358+
static std::string chosenInstalock = "Instalock champ \t\tChosen: " + Misc::ChampIdToName(S.gameTab.instalockId) + "###AnimatedInstalock";
359+
static int lastInstalockId = 0;
360+
if ((lastInstalockId != S.gameTab.instalockId) && !isStillDownloading)
361+
{
362+
lastInstalockId = S.gameTab.instalockId;
363+
chosenInstalock = "Instalock champ \t\tChosen: " + Misc::ChampIdToName(S.gameTab.instalockId) + "###AnimatedInstalock";
364+
}
355365
if (ImGui::CollapsingHeader(chosenInstalock.c_str()))
356366
{
357367
std::vector<std::pair<int, std::string>>instalockChamps = GetInstalockChamps();
@@ -365,7 +375,13 @@ class GameTab
365375
}
366376
}
367377

368-
std::string chosenBackup = "Backup pick \t\t\tChosen: " + Misc::ChampIdToName(S.gameTab.backupId) + "###AnimatedBackup";
378+
static std::string chosenBackup = "Backup pick \t\t\tChosen: " + Misc::ChampIdToName(S.gameTab.backupId) + "###AnimatedBackup";
379+
static int lastBackupId = 0;
380+
if ((lastBackupId != S.gameTab.backupId) && !isStillDownloading)
381+
{
382+
lastBackupId = S.gameTab.backupId;
383+
chosenBackup = "Backup pick \t\t\tChosen: " + Misc::ChampIdToName(S.gameTab.backupId) + "###AnimatedBackup";
384+
}
369385
if (ImGui::CollapsingHeader(chosenBackup.c_str()))
370386
{
371387
ImGui::Text("None");
@@ -382,7 +398,13 @@ class GameTab
382398
}
383399
}
384400

385-
std::string chosenAutoban = "Auto ban\t\t\t\tChosen: " + Misc::ChampIdToName(S.gameTab.autoBanId) + "###AnimatedAutoban";
401+
static std::string chosenAutoban = "Auto ban\t\t\t\tChosen: " + Misc::ChampIdToName(S.gameTab.autoBanId) + "###AnimatedAutoban";
402+
static int lastAutoban = 0;
403+
if ((lastAutoban != S.gameTab.autoBanId) && !isStillDownloading)
404+
{
405+
lastAutoban = S.gameTab.autoBanId;
406+
chosenAutoban = "Auto ban\t\t\t\tChosen: " + Misc::ChampIdToName(S.gameTab.autoBanId) + "###AnimatedAutoban";
407+
}
386408
if (ImGui::CollapsingHeader(chosenAutoban.c_str()))
387409
{
388410
if (champSkins.empty())

KBotExt/Misc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Misc
6262
if (reader->parse(getLatest.c_str(), getLatest.c_str() + static_cast<int>(getLatest.length()), &root, &err))
6363
{
6464
std::string latestName = root["tag_name"].asString();
65-
if (latestName != "1.3.2")
65+
if (latestName != "1.4.0")
6666
{
6767
if (MessageBoxA(0, "Open download website?", "New version available", MB_YESNO | MB_SETFOREGROUND) == IDYES)
6868
{

0 commit comments

Comments
 (0)