mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 05:47:43 +01:00
* Add IconTexture/Wrap to INotification (#1738) Notification record and IActiveNotification interface now supports setting or updating the texture wraps being used, and SetIconTexture has gotten more overloads to support leaveOpen mechanism that can commonly be found with Stream wrappers. ImGui widget is updated to support testing setting "leaveOpen" and updating "IconTexture" property via setter, making it possible to check whether IDTW.Dispose is being called under given conditions. Some changes to doccomments are made. * typo
This commit is contained in:
parent
12d70f0749
commit
55bd845a63
7 changed files with 231 additions and 40 deletions
21
Dalamud/Interface/Textures/DalamudTextureWrapExtensions.cs
Normal file
21
Dalamud/Interface/Textures/DalamudTextureWrapExtensions.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using Dalamud.Interface.Internal;
|
||||
|
||||
namespace Dalamud.Interface.Textures;
|
||||
|
||||
/// <summary>Extension methods for <see cref="IDalamudTextureWrap"/>.</summary>
|
||||
public static class DalamudTextureWrapExtensions
|
||||
{
|
||||
/// <summary>Checks if two instances of <see cref="IDalamudTextureWrap"/> point to a same underlying resource.
|
||||
/// </summary>
|
||||
/// <param name="a">The resource 1.</param>
|
||||
/// <param name="b">The resource 2.</param>
|
||||
/// <returns><c>true</c> if both instances point to a same underlying resource.</returns>
|
||||
public static bool ResourceEquals(this IDalamudTextureWrap? a, IDalamudTextureWrap? b)
|
||||
{
|
||||
if (a is null != b is null)
|
||||
return false;
|
||||
if (a is null)
|
||||
return false;
|
||||
return a.ImGuiHandle == b.ImGuiHandle;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue