yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gui::DisabledScope Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DisabledScope() [1/2]

yaze::gui::DisabledScope::DisabledScope ( bool disabled = true)
inlineexplicit

Definition at line 151 of file style_guard.h.

◆ ~DisabledScope()

yaze::gui::DisabledScope::~DisabledScope ( )
inline

Definition at line 155 of file style_guard.h.

◆ DisabledScope() [2/2]

yaze::gui::DisabledScope::DisabledScope ( const DisabledScope & )
delete

Member Function Documentation

◆ operator=()

DisabledScope & yaze::gui::DisabledScope::operator= ( const DisabledScope & )
delete

The documentation for this class was generated from the following file: