mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Use more of the CS version for ActionDetailHover (#2079)
* - Use CS for delegate - Sync HoverActionKind with CS version * Undo changes in favor of #2080
This commit is contained in:
parent
4e76669779
commit
7c6ed6de76
2 changed files with 123 additions and 18 deletions
|
|
@ -92,7 +92,7 @@ internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
|
|||
|
||||
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
|
||||
private delegate char HandleImmDelegate(IntPtr framework, char a2, byte a3);
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public event EventHandler<bool>? UiHideToggled;
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
|
|||
inView = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
pCoords *= MathF.Abs(1.0f / pCoords.W);
|
||||
screenPos = new Vector2(pCoords.X, pCoords.Y);
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
|
|||
worldPos = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var camera = FFXIVClientStructs.FFXIV.Client.Graphics.Scene.CameraManager.Instance()->CurrentCamera;
|
||||
if (camera == null)
|
||||
{
|
||||
|
|
@ -221,7 +221,7 @@ internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
|
|||
|
||||
/// <inheritdoc/>
|
||||
public IntPtr FindAgentInterface(void* addon) => this.FindAgentInterface((IntPtr)addon);
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IntPtr FindAgentInterface(IntPtr addonPtr)
|
||||
{
|
||||
|
|
@ -422,13 +422,13 @@ internal class GameGuiPluginScoped : IInternalDisposableService, IGameGui
|
|||
this.gameGuiService.HoveredItemChanged += this.HoveredItemForward;
|
||||
this.gameGuiService.HoveredActionChanged += this.HoveredActionForward;
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public event EventHandler<bool>? UiHideToggled;
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public event EventHandler<ulong>? HoveredItemChanged;
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public event EventHandler<HoveredAction>? HoveredActionChanged;
|
||||
|
||||
|
|
@ -444,7 +444,7 @@ internal class GameGuiPluginScoped : IInternalDisposableService, IGameGui
|
|||
|
||||
/// <inheritdoc/>
|
||||
public HoveredAction HoveredAction => this.gameGuiService.HoveredAction;
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
void IInternalDisposableService.DisposeService()
|
||||
{
|
||||
|
|
@ -456,7 +456,7 @@ internal class GameGuiPluginScoped : IInternalDisposableService, IGameGui
|
|||
this.HoveredItemChanged = null;
|
||||
this.HoveredActionChanged = null;
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool OpenMapWithMapLink(MapLinkPayload mapLink)
|
||||
=> this.gameGuiService.OpenMapWithMapLink(mapLink);
|
||||
|
|
@ -464,7 +464,7 @@ internal class GameGuiPluginScoped : IInternalDisposableService, IGameGui
|
|||
/// <inheritdoc/>
|
||||
public bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos)
|
||||
=> this.gameGuiService.WorldToScreen(worldPos, out screenPos);
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos, out bool inView)
|
||||
=> this.gameGuiService.WorldToScreen(worldPos, out screenPos, out inView);
|
||||
|
|
@ -476,26 +476,26 @@ internal class GameGuiPluginScoped : IInternalDisposableService, IGameGui
|
|||
/// <inheritdoc/>
|
||||
public IntPtr GetUIModule()
|
||||
=> this.gameGuiService.GetUIModule();
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IntPtr GetAddonByName(string name, int index = 1)
|
||||
=> this.gameGuiService.GetAddonByName(name, index);
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IntPtr FindAgentInterface(string addonName)
|
||||
=> this.gameGuiService.FindAgentInterface(addonName);
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public unsafe IntPtr FindAgentInterface(void* addon)
|
||||
public unsafe IntPtr FindAgentInterface(void* addon)
|
||||
=> this.gameGuiService.FindAgentInterface(addon);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IntPtr FindAgentInterface(IntPtr addonPtr)
|
||||
public IntPtr FindAgentInterface(IntPtr addonPtr)
|
||||
=> this.gameGuiService.FindAgentInterface(addonPtr);
|
||||
|
||||
private void UiHideToggledForward(object sender, bool toggled) => this.UiHideToggled?.Invoke(sender, toggled);
|
||||
|
||||
|
||||
private void HoveredItemForward(object sender, ulong itemId) => this.HoveredItemChanged?.Invoke(sender, itemId);
|
||||
|
||||
|
||||
private void HoveredActionForward(object sender, HoveredAction hoverAction) => this.HoveredActionChanged?.Invoke(sender, hoverAction);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ public enum HoverActionKind
|
|||
/// </summary>
|
||||
Action = 28,
|
||||
|
||||
/// <summary>
|
||||
/// A crafting action is hovered.
|
||||
/// </summary>
|
||||
CraftingAction = 29,
|
||||
|
||||
/// <summary>
|
||||
/// A general action is hovered.
|
||||
/// </summary>
|
||||
|
|
@ -24,7 +29,7 @@ public enum HoverActionKind
|
|||
/// <summary>
|
||||
/// A companion order type of action is hovered.
|
||||
/// </summary>
|
||||
CompanionOrder = 31,
|
||||
CompanionOrder = 31, // Game Term: BuddyOrder
|
||||
|
||||
/// <summary>
|
||||
/// A main command type of action is hovered.
|
||||
|
|
@ -36,6 +41,11 @@ public enum HoverActionKind
|
|||
/// </summary>
|
||||
ExtraCommand = 33,
|
||||
|
||||
/// <summary>
|
||||
/// A companion action is hovered.
|
||||
/// </summary>
|
||||
Companion = 34,
|
||||
|
||||
/// <summary>
|
||||
/// A pet order type of action is hovered.
|
||||
/// </summary>
|
||||
|
|
@ -45,4 +55,99 @@ public enum HoverActionKind
|
|||
/// A trait is hovered.
|
||||
/// </summary>
|
||||
Trait = 36,
|
||||
|
||||
/// <summary>
|
||||
/// A buddy action is hovered.
|
||||
/// </summary>
|
||||
BuddyAction = 37,
|
||||
|
||||
/// <summary>
|
||||
/// A company action is hovered.
|
||||
/// </summary>
|
||||
CompanyAction = 38,
|
||||
|
||||
/// <summary>
|
||||
/// A mount is hovered.
|
||||
/// </summary>
|
||||
Mount = 39,
|
||||
|
||||
/// <summary>
|
||||
/// A chocobo race action is hovered.
|
||||
/// </summary>
|
||||
ChocoboRaceAction = 40,
|
||||
|
||||
/// <summary>
|
||||
/// A chocobo race item is hovered.
|
||||
/// </summary>
|
||||
ChocoboRaceItem = 41,
|
||||
|
||||
/// <summary>
|
||||
/// A deep dungeon equipment is hovered.
|
||||
/// </summary>
|
||||
DeepDungeonEquipment = 42,
|
||||
|
||||
/// <summary>
|
||||
/// A deep dungeon equipment 2 is hovered.
|
||||
/// </summary>
|
||||
DeepDungeonEquipment2 = 43,
|
||||
|
||||
/// <summary>
|
||||
/// A deep dungeon item is hovered.
|
||||
/// </summary>
|
||||
DeepDungeonItem = 44,
|
||||
|
||||
/// <summary>
|
||||
/// A quick chat is hovered.
|
||||
/// </summary>
|
||||
QuickChat = 45,
|
||||
|
||||
/// <summary>
|
||||
/// An action combo route is hovered.
|
||||
/// </summary>
|
||||
ActionComboRoute = 46,
|
||||
|
||||
/// <summary>
|
||||
/// A pvp trait is hovered.
|
||||
/// </summary>
|
||||
PvPSelectTrait = 47,
|
||||
|
||||
/// <summary>
|
||||
/// A squadron action is hovered.
|
||||
/// </summary>
|
||||
BgcArmyAction = 48,
|
||||
|
||||
/// <summary>
|
||||
/// A perform action is hovered.
|
||||
/// </summary>
|
||||
Perform = 49,
|
||||
|
||||
/// <summary>
|
||||
/// A deep dungeon magic stone is hovered.
|
||||
/// </summary>
|
||||
DeepDungeonMagicStone = 50,
|
||||
|
||||
/// <summary>
|
||||
/// A deep dungeon demiclone is hovered.
|
||||
/// </summary>
|
||||
DeepDungeonDemiclone = 51,
|
||||
|
||||
/// <summary>
|
||||
/// An eureka magia action is hovered.
|
||||
/// </summary>
|
||||
EurekaMagiaAction = 52,
|
||||
|
||||
/// <summary>
|
||||
/// An island sanctuary temporary item is hovered.
|
||||
/// </summary>
|
||||
MYCTemporaryItem = 53,
|
||||
|
||||
/// <summary>
|
||||
/// An ornament is hovered.
|
||||
/// </summary>
|
||||
Ornament = 54,
|
||||
|
||||
/// <summary>
|
||||
/// Glasses are hovered.
|
||||
/// </summary>
|
||||
Glasses = 55,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue