summaryrefslogtreecommitdiffhomepage
path: root/editor/imgui-raii.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/imgui-raii.cpp')
-rw-r--r--editor/imgui-raii.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/imgui-raii.cpp b/editor/imgui-raii.cpp
index 8f784126..05e9edab 100644
--- a/editor/imgui-raii.cpp
+++ b/editor/imgui-raii.cpp
@@ -36,6 +36,12 @@ raii_wrapper push_style_color(ImGuiCol_ var, const Color4& value)
return {[]{ ImGui::PopStyleColor(); }};
}
+raii_wrapper push_id(StringView str)
+{
+ ImGui::PushID(str.data(), str.data() + str.size());
+ return {[]{ ImGui::PopID(); }};
+}
+
raii_wrapper push_style_var(ImGuiStyleVar_ var, float value)
{
ImGui::PushStyleVar(var, value);