Class ImRaii.FontDisposable
A wrapper around pushing fonts.
Assembly: Dalamud.dll
public sealed class ImRaii.FontDisposable : IDisposable
Implements:
System.IDisposable
Properties
Count
Gets the number of fonts currently pushed using this disposable.
public int Count { get; }
Methods
DefaultFont()
Push the default font if any other font is currently pushed.
[Obsolete("Use `ImRaii.DefaultFont()` instead.")]
public static ImRaii.FontDisposable DefaultFont()
Returns
Dalamud.Interface.Utility.Raii.ImRaii.FontDisposable: A disposable object that can be used to push further fonts and pops those fonts after leaving scope. Use with using.
PushDefaultFont()
Push the default font if any other font is currently pushed.
public static ImRaii.FontDisposable PushDefaultFont()
Returns
Dalamud.Interface.Utility.Raii.ImRaii.FontDisposable: A disposable object that can be used to push further fonts and pops those fonts after leaving scope. Use with using.
Push(ImFontPtr, bool)
Push a font to the font stack.
public ImRaii.FontDisposable Push(ImFontPtr font, bool condition = true)
Returns
Dalamud.Interface.Utility.Raii.ImRaii.FontDisposable: A disposable object that can be used to push further fonts and pops those fonts after leaving scope. Use with using.
Parameters
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImFontPtr | font | The font to push. |
System.Boolean | condition | If this is false, the font is not pushed. |
Remarks
If you need to keep fonts pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.FontDisposable.PopUnsafe(int).
Pop(int)
Pop a number of fonts.
public void Pop(int num = 1)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The number of fonts to pop. This is clamped to the number of fonts pushed by this object. |
Dispose()
Pop all pushed fonts.
public void Dispose()
PopUnsafe(int)
Pop a number of fonts.
public static void PopUnsafe(int num = 1)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The number of fonts to pop. The number is not checked against the font stack. |
Remarks
Avoid using this function, and fonts across scopes, as much as possible.
Implements
System.IDisposable