More WIP DearImGUI conversion

This commit is contained in:
Graham Pentheny
2025-07-13 12:43:10 -04:00
parent d534b4dc14
commit 95a7b45c32
10 changed files with 206 additions and 252 deletions

View File

@@ -785,17 +785,9 @@ int main(int /*argc*/, char** /*argv*/)
// Test cases
if (app.showTestCases)
{
static int testScroll = 0;
if (imguiBeginScrollArea(
"Choose Test To Run",
app.width - 10 - 250 - 10 - 200,
app.height - 10 - 450,
200,
450,
&testScroll))
{
app.mouseOverMenu = true;
}
ImGui::SetNextWindowPos(ImVec2(static_cast<float>(app.width - 10 - 250 - 10 - 200), static_cast<float>(app.height - 10 - 450)), ImGuiCond_Always); // Position in screen space
ImGui::SetNextWindowSize(ImVec2(200, 450, ImGuiCond_Always); // Size of the window
ImGui::Begin("Choose Test To Run", nullptr, staticWindowFlags);
vector<string>::const_iterator fileIter = app.files.begin();
vector<string>::const_iterator filesEnd = app.files.end();
@@ -808,6 +800,21 @@ int main(int /*argc*/, char** /*argv*/)
}
}
if (ImGui::BeginCombo("Dropdown", items[current_item].c_str()))
{
for (int i = 0; i < items.size(); i++)
{
bool is_selected = (current_item == i);
if (ImGui::Selectable(items[i].c_str(), is_selected))
{
current_item = i;
}
if (is_selected)
ImGui::SetItemDefaultFocus();
}
ImGui::EndCombo();
}
if (testToLoad != filesEnd)
{
string path = app.testCasesFolder + "/" + *testToLoad;