19 lines
636 B
C#
19 lines
636 B
C#
namespace AcDream.Plugin.Abstractions;
|
|
|
|
/// <summary>A plugin-safe selection transition matching retail's selected-target callback.</summary>
|
|
public readonly record struct SelectionChangedEvent(
|
|
uint? PreviousObjectId,
|
|
uint? SelectedObjectId);
|
|
|
|
/// <summary>
|
|
/// Shared selected-object service. Plugins read and change the same selection
|
|
/// used by the world, radar, inventory, paperdoll, and toolbar.
|
|
/// </summary>
|
|
public interface ISelectionService
|
|
{
|
|
uint? SelectedObjectId { get; }
|
|
uint? PreviousObjectId { get; }
|
|
event Action<SelectionChangedEvent> Changed;
|
|
bool Select(uint objectId);
|
|
bool Clear();
|
|
}
|