git.s-ol.nu ~forks/DiligentTools / 55957e1
Moved ImGuiScopedDisabler to ImGui namespace and renamed to ScopedDisabler assiduous 1 year, 2 months ago
1 changed file(s) with 4 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
3232 #include "../../ThirdParty/imgui/imgui.h"
3333 #include "../../ThirdParty/imgui/imgui_internal.h"
3434
35 namespace Diligent
35 namespace ImGui
3636 {
3737
38 class ImGuiScopedDisabler
38 class ScopedDisabler
3939 {
4040 public:
41 explicit ImGuiScopedDisabler(bool Disable, float AlphaScale = 0.25f) :
41 explicit ScopedDisabler(bool Disable, float AlphaScale = 0.25f) :
4242 m_IsDisabled{Disable}
4343 {
4444 if (m_IsDisabled)
4848 }
4949 }
5050
51 ~ImGuiScopedDisabler()
51 ~ScopedDisabler()
5252 {
5353 if (m_IsDisabled)
5454 {
6060 private:
6161 const bool m_IsDisabled;
6262 };
63
64 } // namespace Diligent
65
66 namespace ImGui
67 {
6863
6964 template <typename T>
7065 inline bool Checkbox(const char* label, T* v)