From e90e414d5a390a6dd61c155aad1d4d2166e2832c Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 10 Jun 2023 15:09:20 +0200 Subject: [PATCH] impr: Show infinity icon in pattern editor view when pattern limit is disabled --- .../source/content/views/view_pattern_editor.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index 320e9891a..f9e10b5e4 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -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::max()) { + ImGui::TextFormatted("{} / {}", + runtime.getCreatedPatternCount(), + ICON_FA_INFINITY); + } else { + ImGui::TextFormatted("{} / {}", + runtime.getCreatedPatternCount(), + runtime.getMaximumPatternCount()); + } } }