mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
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:
parent
6c26943cb7
commit
2b46397e8e
12 changed files with 225 additions and 43 deletions
32
Penumbra.Api/IPenumbraApi.cs
Normal file
32
Penumbra.Api/IPenumbraApi.cs
Normal 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 );
|
||||
}
|
||||
}
|
||||
41
Penumbra.Api/Penumbra.Api.csproj
Normal file
41
Penumbra.Api/Penumbra.Api.csproj
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<AssemblyTitle>Penumbra.Api</AssemblyTitle>
|
||||
<Company>absolute gangstas</Company>
|
||||
<Product>Penumbra</Product>
|
||||
<Copyright>Copyright © 2020</Copyright>
|
||||
<FileVersion>1.0.0.0</FileVersion>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);MSB3277</MSBuildWarningsAsMessages>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Dalamud">
|
||||
<HintPath>$(DALAMUD_ROOT)\Dalamud.dll</HintPath>
|
||||
<HintPath>..\libs\Dalamud.dll</HintPath>
|
||||
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Dalamud.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Penumbra.GameData\Penumbra.GameData.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
12
Penumbra.Api/RedrawType.cs
Normal file
12
Penumbra.Api/RedrawType.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
namespace Penumbra.Api
|
||||
{
|
||||
public enum RedrawType
|
||||
{
|
||||
WithoutSettings,
|
||||
WithSettings,
|
||||
OnlyWithSettings,
|
||||
Unload,
|
||||
RedrawWithoutSettings,
|
||||
RedrawWithSettings,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue