Skip to content

ImGuiGuardedValue<T> Struct

Makes a copy of a value and allows it to be changed. The change can be committed or reverted.

C#
public struct ImGuiGuardedValue<T> where T : struct

T
A structure.

Creates a new instance of this structure, wrapping the provided value.

C#
public ImGuiGuardedValue(T value)

value T
The original value.

The original value.

C#
public T OriginalValue

The current value.

C#
public T CurrentValue

Returns true when the original value doesn’t equal the current value.

C#
public bool IsChanged()

bool
A value to indicate changed state.

Sets the original value to the current value.

C#
public void Commit()

Sets the current value to the original value.

C#
public void Reset()