-
Автор темы
- #1
Hello, I have such a problem. I am trying to add cfg in a listbox, but when I go to the tab where this listbox is, it gets a crash.
Debug ( its polish version sorry ) :
code:
Debug ( its polish version sorry ) :
code:
Код:
else if (tabs == 4)
{
static float flConfigChildSize = 0.f;
ImGui::SetCursorPos(ImVec2(45, 125));
ImGui::BeginChild("##AGFD", ImVec2(0, flConfigChildSize));
{
ImGui::SetCursorPos(ImVec2(15, 15));
ImGui::PushItemWidth(-1);
ImGui::ListBox(XorStr("##config.list"), &iSelectedConfig, [](int nIndex)
{
// return current displaying configuration name
return C::vecFileNames.at(nIndex).c_str();
}, C::vecFileNames.size(), 5);
szCurrentConfig = !C::vecFileNames.empty() ? C::vecFileNames.at(iSelectedConfig) : "";
ImGui::PopItemWidth();
}
ImGui::EndChild();
}