1
0
mirror of synced 2024-11-28 17:40:51 +01:00

impr: Show infinity icon in pattern editor view when pattern limit is disabled

This commit is contained in:
WerWolv 2023-06-10 15:09:20 +02:00
parent 73d4214fd3
commit e90e414d5a

View File

@ -171,9 +171,15 @@ namespace hex::plugin::builtin {
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
ImGui::SameLine();
ImGui::TextFormatted("{} / {}",
runtime.getCreatedPatternCount(),
runtime.getMaximumPatternCount());
if (auto max = runtime.getMaximumPatternCount(); max >= std::numeric_limits<u32>::max()) {
ImGui::TextFormatted("{} / {}",
runtime.getCreatedPatternCount(),
ICON_FA_INFINITY);
} else {
ImGui::TextFormatted("{} / {}",
runtime.getCreatedPatternCount(),
runtime.getMaximumPatternCount());
}
}
}