Merge pull request #6 from Shichiha/patch-5

Update AnimationChanger.cpp
This commit is contained in:
Taiga 2022-08-03 01:38:20 -07:00 committed by GitHub
commit 2f68e46e51

View File

@ -245,12 +245,11 @@ namespace cheat::feature
{ {
if (ImGui::BeginCombo("Animations", f_Animation.value().c_str())) if (ImGui::BeginCombo("Animations", f_Animation.value().c_str()))
{ {
for (int n = 0; n < IM_ARRAYSIZE(animations); n++) for (auto &animation : animations)
{ {
bool is_selected = (f_Animation.value().c_str() == animations[n]); bool is_selected = (f_Animation.value().c_str() == animation);
if (ImGui::Selectable(animations[n].c_str(), is_selected)) if (ImGui::Selectable(animation.c_str(), is_selected))
f_Animation.value() = animations[n]; f_Animation.value() = animation;
if (is_selected) if (is_selected)
ImGui::SetItemDefaultFocus(); ImGui::SetItemDefaultFocus();
} }