Update Menu.hpp

This commit is contained in:
0TheSpy 2021-07-12 12:45:13 +03:00 committed by GitHub
parent fc58802e50
commit d0441a06e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2067,6 +2067,9 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
{ {
puts("File successfully deleted"); puts("File successfully deleted");
opt.autoconfig = -1; opt.autoconfig = -1;
} }
} }
} }
@ -2079,7 +2082,12 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
if (ImGui::Button("Create", ImVec2(70, 22))) if (ImGui::Button("Create", ImVec2(70, 22)))
{
Config::Get().Create(name); Config::Get().Create(name);
Config::Get().FindAutoexec();
}
DisableElements(Config::Get().configs.size(), 1); DisableElements(Config::Get().configs.size(), 1);
if (ImGui::Button("Save", ImVec2(70, 22))) if (ImGui::Button("Save", ImVec2(70, 22)))
@ -2087,18 +2095,24 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
DisableElements(Config::Get().configs.size(), 0); DisableElements(Config::Get().configs.size(), 0);
if (ImGui::Button("Refresh", ImVec2(70, 22))) if (ImGui::Button("Refresh", ImVec2(70, 22)))
{
Config::Get().Refresh(); Config::Get().Refresh();
Config::Get().FindAutoexec();
}
ImGui::TableNextColumn(); ImGui::TableNextColumn();
DisableElements(Config::Get().configs.size(), 1);
if (ImGui::Button("Delete", ImVec2(70, 22))) if (ImGui::Button("Delete", ImVec2(70, 22)))
{ {
Config::Get().Delete(selected); Config::Get().Delete(selected);
if (selected >= Config::Get().configs.size()) selected = 0; if (selected >= Config::Get().configs.size()) selected = 0;
if (selected == opt.autoconfig) opt.autoconfig = -1; if (selected == opt.autoconfig) opt.autoconfig = -1;
Config::Get().FindAutoexec();
} }
DisableElements(Config::Get().configs.size(), 1);
if (ImGui::Button("Load", ImVec2(70, 22))) if (ImGui::Button("Load", ImVec2(70, 22)))
Config::Get().Load(selected); Config::Get().Load(selected);
DisableElements(Config::Get().configs.size(), 0); DisableElements(Config::Get().configs.size(), 0);