Expose DTR entries in public interface (#1778)

* expose DTR entries in public interface

* add IReadOnlyDtrBarEntry.UserHidden
This commit is contained in:
goat 2024-04-20 14:46:04 +02:00 committed by GitHub
parent 62863becd5
commit 808f66edc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 123 additions and 18 deletions

View file

@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using Dalamud.Game.Gui.Dtr;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Utility;
namespace Dalamud.Plugin.Services;
@ -10,6 +12,11 @@ namespace Dalamud.Plugin.Services;
/// </summary>
public interface IDtrBar
{
/// <summary>
/// Gets a read-only list of all DTR bar entries.
/// </summary>
public IReadOnlyList<IReadOnlyDtrBarEntry> Entries { get; }
/// <summary>
/// Get a DTR bar entry.
/// This allows you to add your own text, and users to sort it.
@ -18,6 +25,7 @@ public interface IDtrBar
/// <param name="text">The text the entry shows.</param>
/// <returns>The entry object used to update, hide and remove the entry.</returns>
/// <exception cref="ArgumentException">Thrown when an entry with the specified title exists.</exception>
[Api10ToDo("Return IDtrBarEntry instead of DtrBarEntry")]
public DtrBarEntry Get(string title, SeString? text = null);
/// <summary>