From e1a3d837a98fb25370d7875057d55500293cd31d Mon Sep 17 00:00:00 2001 From: HarrySilan Date: Sun, 19 Jun 2022 21:13:45 +0800 Subject: [PATCH] fix TP buttons --- cheat-library/src/user/cheat/teleport/CustomTeleports.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cheat-library/src/user/cheat/teleport/CustomTeleports.cpp b/cheat-library/src/user/cheat/teleport/CustomTeleports.cpp index ef344e6..8156165 100644 --- a/cheat-library/src/user/cheat/teleport/CustomTeleports.cpp +++ b/cheat-library/src/user/cheat/teleport/CustomTeleports.cpp @@ -200,8 +200,7 @@ namespace cheat::feature bool checked = std::any_of(checkedIndices.begin(), checkedIndices.end(), [&index](const auto& i) { return i == index; }); bool selected = index == selectedIndex; - const char* hashId = ("##Index" + std::to_string(index)).c_str(); - ImGui::Checkbox(hashId, &checked); + ImGui::Checkbox(("##Index" + std::to_string(index)).c_str(), &checked); if (ImGui::IsItemClicked(0)) { if (checked) { if (selected) selectedIndex = -1; @@ -213,7 +212,7 @@ namespace cheat::feature } } ImGui::SameLine(); - if (ImGui::Button("TP")) + if (ImGui::Button(("TP##Button" + std::to_string(index)).c_str())) { auto& mapTeleport = MapTeleport::GetInstance(); mapTeleport.TeleportTo(position);