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

RAII guard that pushes ImGuiItemFlags_ReadOnly. More...

#include <style_guard.h>

Public Member Functions

 ReadOnlyScope (bool read_only=true)
 
 ~ReadOnlyScope ()
 
 ReadOnlyScope (const ReadOnlyScope &)=delete
 
ReadOnlyScope & operator= (const ReadOnlyScope &)=delete
 

Detailed Description

RAII guard that pushes ImGuiItemFlags_ReadOnly.

Read-only items still hover and show tooltips, and are not dimmed, but their value does not change. ImGui 1.93 marks the flag [ALPHA]. Only Drag and Slider widgets, InputText, ColorEdit4, and ColorPicker4 honor it; Button, Checkbox, and Combo still react to clicks, so use DisabledScope for those.

Usage: ReadOnlyScope read_only(!can_edit); ImGui::DragInt("Room", &room_id);

Definition at line 193 of file style_guard.h.

Constructor & Destructor Documentation

◆ ReadOnlyScope() [1/2]

yaze::gui::ReadOnlyScope::ReadOnlyScope ( bool read_only = true)
inlineexplicit

Definition at line 195 of file style_guard.h.

◆ ~ReadOnlyScope()

yaze::gui::ReadOnlyScope::~ReadOnlyScope ( )
inline

Definition at line 199 of file style_guard.h.

◆ ReadOnlyScope() [2/2]

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

Member Function Documentation

◆ operator=()

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

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