summaryrefslogtreecommitdiffstats
path: root/Imgui/interface
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-03-25 00:05:02 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-03-25 00:05:02 +0000
commit52273ab3c1a2690ebea2eb82593d60491b03404a (patch)
tree900ea83a9498ecbff3c882a5bc63cfbe9a9a1811 /Imgui/interface
parentGLTF loader: using full texture path as key in texture cache (diff)
downloadDiligentTools-52273ab3c1a2690ebea2eb82593d60491b03404a.tar.gz
DiligentTools-52273ab3c1a2690ebea2eb82593d60491b03404a.zip
Updated ImGuiUtils: added ScopedID helper class
Diffstat (limited to 'Imgui/interface')
-rw-r--r--Imgui/interface/ImGuiUtils.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Imgui/interface/ImGuiUtils.hpp b/Imgui/interface/ImGuiUtils.hpp
index 3c2f68f..8639742 100644
--- a/Imgui/interface/ImGuiUtils.hpp
+++ b/Imgui/interface/ImGuiUtils.hpp
@@ -126,4 +126,19 @@ bool Combo(const char* label, T* current_item, const std::pair<T, const char*> i
return value_changed;
}
+template <typename IDType>
+class ScopedID
+{
+public:
+ ScopedID(IDType ID)
+ {
+ PushID(ID);
+ }
+
+ ~ScopedID()
+ {
+ PopID();
+ }
+};
+
} // namespace ImGui