1
0
mirror of synced 2024-09-23 19:18:24 +02:00

impr: Make sure footer items all start at the same height

This commit is contained in:
WerWolv 2024-06-18 22:11:43 +02:00
parent 085737af15
commit 4fa64500af

View File

@ -59,9 +59,11 @@ namespace hex::plugin::builtin {
ImGui::Separator();
ImGui::SetCursorPosX(8);
for (const auto &callback : ContentRegistry::Interface::impl::getFooterItems()) {
auto prevIdx = drawList->_VtxCurrentIdx;
const auto y = ImGui::GetCursorPosY();
const auto prevIdx = drawList->_VtxCurrentIdx;
callback();
auto currIdx = drawList->_VtxCurrentIdx;
const auto currIdx = drawList->_VtxCurrentIdx;
ImGui::SetCursorPosY(y);
// Only draw separator if something was actually drawn
if (prevIdx != currIdx) {