Class ImRaii.PlotColorDisposable
Assembly: Dalamud.dll​
public sealed class ImRaii.PlotColorDisposable : IDisposable
Implements:
System.IDisposable
Properties​
Count​
Gets the number of colors currently pushed using this disposable.
public int Count { get; }
Methods​
Push(ImPlotCol, uint, bool)​
Push a color to the color stack.
public ImRaii.PlotColorDisposable Push(ImPlotCol type, uint color, bool condition = true)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable: A disposable object that can be used to push further colors and pops those colors after leaving scope. Use with using.
Parameters​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImPlot.ImPlotCol | type | The type of color to change. |
System.UInt32 | color | The color to change it to. |
System.Boolean | condition | If this is false, the color is not pushed. |
Remarks​
If you need to keep colors pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable.PopUnsafe(int).
Push(ImPlotCol, Vector4, bool)​
Push a color to the color stack.
public ImRaii.PlotColorDisposable Push(ImPlotCol type, Vector4 color, bool condition = true)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable: A disposable object that can be used to push further colors and pops those colors after leaving scope. Use with using.
Parameters​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImPlot.ImPlotCol | type | The type of color to change. |
System.Numerics.Vector4 | color | The color to change it to. |
System.Boolean | condition | If this is false, the color is not pushed. |
Remarks​
If you need to keep colors pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable.PopUnsafe(int).
Push(ImPlotCol, Vector4?, bool)​
Push a color to the color stack.
public ImRaii.PlotColorDisposable Push(ImPlotCol type, Vector4? color, bool condition = true)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable: A disposable object that can be used to push further colors and pops those colors after leaving scope. Use with using.
Parameters​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImPlot.ImPlotCol | type | The type of color to change. |
System.Nullable<System.Numerics.Vector4> | color | The color to change it to. If this is null, no color will be set. |
System.Boolean | condition | If this is false, the color is not pushed. |
Remarks​
If you need to keep colors pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable.PopUnsafe(int).
PlotDefaultColors()​
Reverts all pushed colors to their previous values temporarily.
public static ImRaii.PlotColorDisposable PlotDefaultColors()
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable: A disposable object that can be used to push further colors and pops those colors after leaving scope. Use with using.
Remarks​
If you need to keep colors pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable.PopUnsafe(int).
PlotPushDefault(ImPlotCol)​
Push the default value, i.e. the value as if nothing was ever pushed to this, of a color to the color stack.
public ImRaii.PlotColorDisposable PlotPushDefault(ImPlotCol type)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable: A disposable object that can be used to push further colors and pops those colors after leaving scope. Use with using.
Parameters​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImPlot.ImPlotCol | type | The type of color to return to its default value. |
Remarks​
If you need to keep colors pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable.PopUnsafe(int).
Pop(int)​
Pop a number of colors.
public ImRaii.PlotColorDisposable Pop(int num = 1)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotColorDisposable: A disposable object that can be used to push further colors and pops those colors after leaving scope. Use with using.
Parameters​
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The number of colors to pop. This is clamped to the number of colors pushed by this object. |
Dispose()​
Pop all pushed colors.
public void Dispose()
PopUnsafe(int)​
Pop a number of colors.
public static void PopUnsafe(int num = 1)
Parameters​
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The number of colors to pop. The number is not checked against the color stack. |
Remarks​
Avoid using this function, and colors across scopes, as much as possible.
Implements​
System.IDisposable