feat: Fix sub menus, allow recent items to be collapsed

This commit is contained in:
WerWolv
2024-06-25 13:54:29 +02:00
parent c1561c7b6a
commit ba7c10f4b1
12 changed files with 108 additions and 74 deletions

View File

@@ -269,8 +269,7 @@ namespace hex::plugin::builtin {
// Draw telemetry subwindow
ImGui::SetCursorPos((windowSize - subWindowSize) / 2);
ImGuiExt::BeginSubWindow("hex.builtin.oobe.server_contact"_lang, subWindowSize, ImGuiChildFlags_AutoResizeY);
{
if (ImGuiExt::BeginSubWindow("hex.builtin.oobe.server_contact"_lang, nullptr, subWindowSize, ImGuiChildFlags_AutoResizeY)) {
// Draw telemetry information
auto yBegin = ImGui::GetCursorPosY();
std::string message = "hex.builtin.oobe.server_contact.text"_lang;
@@ -356,8 +355,9 @@ namespace hex::plugin::builtin {
auto yEnd = ImGui::GetCursorPosY();
subWindowSize = ImGui::GetWindowSize();
subWindowSize.y = (yEnd - yBegin) + 35_scaled;
ImGuiExt::EndSubWindow();
}
ImGuiExt::EndSubWindow();
break;
}