diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-03-25 00:05:02 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-03-25 00:05:02 +0000 |
| commit | 52273ab3c1a2690ebea2eb82593d60491b03404a (patch) | |
| tree | 900ea83a9498ecbff3c882a5bc63cfbe9a9a1811 /Imgui/interface | |
| parent | GLTF loader: using full texture path as key in texture cache (diff) | |
| download | DiligentTools-52273ab3c1a2690ebea2eb82593d60491b03404a.tar.gz DiligentTools-52273ab3c1a2690ebea2eb82593d60491b03404a.zip | |
Updated ImGuiUtils: added ScopedID helper class
Diffstat (limited to 'Imgui/interface')
| -rw-r--r-- | Imgui/interface/ImGuiUtils.hpp | 15 |
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 |
