mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-20 06:47:44 +01:00
Add IFontHandle.Lock and WaitAsync
This commit is contained in:
parent
620f3999d2
commit
d70b430e0d
9 changed files with 543 additions and 86 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Numerics;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Dalamud.Interface.ManagedFontAtlas;
|
||||
using Dalamud.Interface.ManagedFontAtlas.Internals;
|
||||
|
|
@ -28,6 +29,13 @@ public sealed class GameFontHandle : IFontHandle
|
|||
this.fontAtlasFactory = fontAtlasFactory;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public event Action<IFontHandle> ImFontChanged
|
||||
{
|
||||
add => this.fontHandle.ImFontChanged += value;
|
||||
remove => this.fontHandle.ImFontChanged -= value;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Exception? LoadException => this.fontHandle.LoadException;
|
||||
|
||||
|
|
@ -55,15 +63,21 @@ public sealed class GameFontHandle : IFontHandle
|
|||
/// <inheritdoc />
|
||||
public void Dispose() => this.fontHandle.Dispose();
|
||||
|
||||
/// <inheritdoc />
|
||||
public IFontHandle.ImFontLocked Lock() => this.fontHandle.Lock();
|
||||
|
||||
/// <summary>
|
||||
/// Pushes the font.
|
||||
/// </summary>
|
||||
/// <returns>An <see cref="IDisposable"/> that can be used to pop the font on dispose.</returns>
|
||||
public IDisposable Push() => this.fontHandle.Push();
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
IFontHandle.FontPopper IFontHandle.Push() => this.fontHandle.Push();
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<IFontHandle> WaitAsync() => this.fontHandle.WaitAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="GameFontLayoutPlan.Builder"/>.<br />
|
||||
/// <br />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue