ImGui::SetNextWindowSize(ImVec2(400.f, 340.f));
if (ImGui::Begin("Configs", &bIsGuiVisible, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize))
{
if (Settings::Misc::SkeetBar)
{
static float flRainbow;
float flSpeed = 0.001;
int curWidth = 4;
ImVec2 curPos = ImGui::GetCursorPos();
ImVec2 curWindowPos = ImGui::GetWindowPos();
curPos.x += curWindowPos.x;
curPos.y += curWindowPos.y;
int size;
int y;
Interfaces::Engine()->GetScreenSize(y, size);
ImDrawRectRainbow(curPos.x - 10, curPos.y - 8, ImGui::GetWindowSize().x + size, curPos.y + -4, flSpeed, flRainbow);//10 5 4
}
static int iConfigSelect = 0;
static int iMenuSheme = 1;
static char ConfigName[64] = { 0 };
ImGui::PushItemWidth(386);
ImGui::ListBoxConfigArray("##Select", &iConfigSelect, ConfigList);
if (ImGui::Button("Load Config", ImVec2(123, 0)))
{
Settings::LoadSettings("C:/indigo/" + ConfigList[iConfigSelect]);
}
ImGui::SameLine();
if (ImGui::Button("Save Config", ImVec2(123, 0)))
{
if (iConfigSelect >= 0)
Settings::SaveSettings("C:/indigo/" + ConfigList[iConfigSelect]);
else
Settings::SaveSettings("C:/indigo/clearcfg.ini");
}
ImGui::SameLine();
if (ImGui::Button("Delete Config", ImVec2(123, 0)))
{
remove(string(BaseDir + "C:/indigo/" + ConfigList[iConfigSelect]).c_str());
RefreshConfigs();
}
if (ImGui::Button("Refresh Config List", ImVec2(386, 0)))
{
RefreshConfigs();
}
ImGui::Separator();
ImGui::PushItemWidth(386);
ImGui::InputText("##Config Name", ConfigName, 64);
if (ImGui::Button("Create & Save new Config", ImVec2(386, 0)))
{
string ConfigFileName = ConfigName;
if (ConfigFileName.size() < 1)
{
ConfigFileName = "settings";
}
Settings::SaveSettings(BaseDir + "C:/indigo/" + ConfigFileName + ".ini");
RefreshConfigs();
}
ImGui::End();
}