summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/imgui_extras.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/imgui_extras.h b/ui/imgui_extras.h
index b27bc17..8b87b28 100644
--- a/ui/imgui_extras.h
+++ b/ui/imgui_extras.h
@@ -1,4 +1,7 @@
#include <imgui.h>
+#include <imgui_internal.h>
+#include <memory>
+#include <ranges>
namespace IltGui {
// NOLINTBEGIN(readability-identifier-naming)
@@ -6,5 +9,16 @@ namespace IltGui {
ImGuiWindowFlags windowFlags = 0);
bool BeginToolbar(const char * name, ImGuiDir dir, float axisSize, ImGuiWindowFlags windowFlags = 0);
void EndToolbar();
+
+ void
+ Text(std::ranges::contiguous_range auto text, ImGuiTextFlags flags = ImGuiTextFlags_None)
+ requires requires {
+ { std::to_address(text.begin()) } -> std::convertible_to<const char *>;
+ { std::to_address(text.end()) } -> std::convertible_to<const char *>;
+ }
+ {
+ ImGui::TextEx(std::to_address(text.begin()), std::to_address(text.end()), flags);
+ }
+
// NOLINTEND(readability-identifier-naming)
}