Create a interface for a basic API to use the ActorRefresh and register actions to clicks on changed items (for now).

This commit is contained in:
Ottermandias 2021-07-26 15:56:09 +02:00
parent 6c26943cb7
commit 2b46397e8e
12 changed files with 225 additions and 43 deletions

View file

@ -0,0 +1,32 @@
using System;
using Dalamud.Game.ClientState.Actors.Types;
namespace Penumbra.Api
{
public interface IPenumbraApiBase
{
public int ApiVersion { get; }
public bool Valid { get; }
}
public enum MouseButton
{
None,
Left,
Right,
Middle,
}
public delegate void ChangedItemHover( object? item );
public delegate void ChangedItemClick( MouseButton button, object? item );
public interface IPenumbraApi : IPenumbraApiBase
{
public event ChangedItemHover? ChangedItemTooltip;
public event ChangedItemClick? ChangedItemClicked;
public void RedrawActor( string name, RedrawType setting );
public void RedrawActor( Actor actor, RedrawType setting );
public void RedrawAll( RedrawType setting );
}
}