RAII guard for ImGui::BeginDisabled / ImGui::EndDisabled. More...
#include <style_guard.h>
Public Member Functions | |
| DisabledScope (bool disabled=true) | |
| ~DisabledScope () | |
| DisabledScope (const DisabledScope &)=delete | |
| DisabledScope & | operator= (const DisabledScope &)=delete |
RAII guard for ImGui::BeginDisabled / ImGui::EndDisabled.
DisabledScope(false) still pushes and pops, so the argument can be a runtime condition with no if around the scope. A DisabledScope(false) nested inside a disabled scope does not re-enable items; ImGui keeps them disabled.
Usage: DisabledScope disabled(!rom_loaded); ImGui::Button("Save");
Definition at line 149 of file style_guard.h.
|
inlineexplicit |
Definition at line 151 of file style_guard.h.
|
inline |
Definition at line 155 of file style_guard.h.
|
delete |
|
delete |