refactor: move InternalAction to native items only
This commit is contained in:
parent
dc593f5751
commit
dc596aee66
@ -6,7 +6,6 @@ using System.Text;
|
|||||||
using Dalamud;
|
using Dalamud;
|
||||||
using Dalamud.Game;
|
using Dalamud.Game;
|
||||||
using Dalamud.Hooking;
|
using Dalamud.Hooking;
|
||||||
using Dalamud.Plugin;
|
|
||||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||||
using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType;
|
using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType;
|
||||||
|
|
||||||
@ -236,7 +235,7 @@ namespace XivCommon.Functions {
|
|||||||
|
|
||||||
// set up the agent to take the appropriate action for this item
|
// set up the agent to take the appropriate action for this item
|
||||||
*(menuActions + 7 + i) = item switch {
|
*(menuActions + 7 + i) = item switch {
|
||||||
NativeContextMenuItem => item.InternalAction,
|
NativeContextMenuItem nativeItem => nativeItem.InternalAction,
|
||||||
_ => NoopContextId,
|
_ => NoopContextId,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -311,11 +310,6 @@ namespace XivCommon.Functions {
|
|||||||
/// A base context menu item
|
/// A base context menu item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class BaseContextMenuItem {
|
public abstract class BaseContextMenuItem {
|
||||||
/// <summary>
|
|
||||||
/// The action code to be used in the context menu agent for this item.
|
|
||||||
/// </summary>
|
|
||||||
public byte InternalAction { get; internal set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If this item should be enabled in the menu.
|
/// If this item should be enabled in the menu.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -326,6 +320,11 @@ namespace XivCommon.Functions {
|
|||||||
/// A native context menu item
|
/// A native context menu item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class NativeContextMenuItem : BaseContextMenuItem {
|
public sealed class NativeContextMenuItem : BaseContextMenuItem {
|
||||||
|
/// <summary>
|
||||||
|
/// The action code to be used in the context menu agent for this item.
|
||||||
|
/// </summary>
|
||||||
|
public byte InternalAction { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The name of the context item.
|
/// The name of the context item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user