ui: Improved footer item displaying

This commit is contained in:
WerWolv
2022-08-04 11:00:49 +02:00
parent 881b633006
commit a1a3fcbe65
2 changed files with 9 additions and 7 deletions

View File

@@ -240,11 +240,16 @@ namespace hex {
ImGui::Separator();
ImGui::SetCursorPosX(8);
for (const auto &callback : ContentRegistry::Interface::getFooterItems()) {
auto prevIdx = drawList->_VtxCurrentIdx;
callback();
auto currIdx = drawList->_VtxCurrentIdx;
ImGui::SameLine();
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
ImGui::SameLine();
// Only draw separator if something was actually drawn
if (prevIdx != currIdx) {
ImGui::SameLine();
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
ImGui::SameLine();
}
}
{

View File

@@ -210,10 +210,7 @@ namespace hex::plugin::builtin {
}
if (taskCount > 0) {
if (taskCount > 0)
ImGui::TextSpinner(hex::format("({})", taskCount).c_str());
else
ImGui::TextSpinner("");
ImGui::TextSpinner(hex::format("({})", taskCount).c_str());
ImGui::SameLine();