docs: finish documenting all public members
This commit is contained in:
parent
39826ad85b
commit
6f8565e021
@ -6,11 +6,17 @@ using Dalamud.Hooking;
|
|||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
|
|
||||||
namespace XivCommon.Functions {
|
namespace XivCommon.Functions {
|
||||||
|
/// <summary>
|
||||||
|
/// The class containing BattleTalk functionality
|
||||||
|
/// </summary>
|
||||||
public class BattleTalk : IDisposable {
|
public class BattleTalk : IDisposable {
|
||||||
private GameFunctions Functions { get; }
|
private GameFunctions Functions { get; }
|
||||||
private SeStringManager SeStringManager { get; }
|
private SeStringManager SeStringManager { get; }
|
||||||
private bool HookEnabled { get; }
|
private bool HookEnabled { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The delegate for BattleTalk events.
|
||||||
|
/// </summary>
|
||||||
public delegate void BattleTalkEventDelegate(ref SeString sender, ref SeString message, ref BattleTalkOptions options, ref bool isHandled);
|
public delegate void BattleTalkEventDelegate(ref SeString sender, ref SeString message, ref BattleTalkOptions options, ref bool isHandled);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -44,6 +50,7 @@ namespace XivCommon.Functions {
|
|||||||
this.AddBattleTalkHook.Enable();
|
this.AddBattleTalkHook.Enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
this.AddBattleTalkHook?.Dispose();
|
this.AddBattleTalkHook?.Dispose();
|
||||||
}
|
}
|
||||||
@ -115,6 +122,9 @@ namespace XivCommon.Functions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Options for displaying a BattleTalk window.
|
||||||
|
/// </summary>
|
||||||
public class BattleTalkOptions {
|
public class BattleTalkOptions {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Duration to display the window, in seconds.
|
/// Duration to display the window, in seconds.
|
||||||
@ -127,6 +137,9 @@ namespace XivCommon.Functions {
|
|||||||
public BattleTalkStyle Style { get; set; } = BattleTalkStyle.Normal;
|
public BattleTalkStyle Style { get; set; } = BattleTalkStyle.Normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// BattleTalk window styles.
|
||||||
|
/// </summary>
|
||||||
public enum BattleTalkStyle : byte {
|
public enum BattleTalkStyle : byte {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A normal battle talk window with a white background.
|
/// A normal battle talk window with a white background.
|
||||||
|
@ -5,6 +5,9 @@ using System.Text;
|
|||||||
using Dalamud.Game;
|
using Dalamud.Game;
|
||||||
|
|
||||||
namespace XivCommon.Functions {
|
namespace XivCommon.Functions {
|
||||||
|
/// <summary>
|
||||||
|
/// A class containing chat functionality
|
||||||
|
/// </summary>
|
||||||
public class Chat {
|
public class Chat {
|
||||||
private GameFunctions Functions { get; }
|
private GameFunctions Functions { get; }
|
||||||
|
|
||||||
|
@ -4,6 +4,9 @@ using Dalamud.Game;
|
|||||||
using Dalamud.Hooking;
|
using Dalamud.Hooking;
|
||||||
|
|
||||||
namespace XivCommon.Functions {
|
namespace XivCommon.Functions {
|
||||||
|
/// <summary>
|
||||||
|
/// A class containing Party Finder functionality
|
||||||
|
/// </summary>
|
||||||
public class PartyFinder : IDisposable {
|
public class PartyFinder : IDisposable {
|
||||||
private delegate byte RequestPartyFinderListingsDelegate(IntPtr agent, byte categoryIdx);
|
private delegate byte RequestPartyFinderListingsDelegate(IntPtr agent, byte categoryIdx);
|
||||||
|
|
||||||
@ -28,6 +31,7 @@ namespace XivCommon.Functions {
|
|||||||
this.RequestPfListingsHook.Enable();
|
this.RequestPfListingsHook.Enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
this.RequestPfListingsHook?.Dispose();
|
this.RequestPfListingsHook?.Dispose();
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,9 @@ using Dalamud.Game.Text.SeStringHandling;
|
|||||||
using XivCommon.Functions;
|
using XivCommon.Functions;
|
||||||
|
|
||||||
namespace XivCommon {
|
namespace XivCommon {
|
||||||
|
/// <summary>
|
||||||
|
/// A class containing game functions
|
||||||
|
/// </summary>
|
||||||
public class GameFunctions : IDisposable {
|
public class GameFunctions : IDisposable {
|
||||||
private IntPtr UiModulePtr { get; }
|
private IntPtr UiModulePtr { get; }
|
||||||
|
|
||||||
@ -12,8 +15,19 @@ namespace XivCommon {
|
|||||||
|
|
||||||
private GetUiModuleDelegate InternalGetUiModule { get; }
|
private GetUiModuleDelegate InternalGetUiModule { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Chat functions
|
||||||
|
/// </summary>
|
||||||
public Chat Chat { get; }
|
public Chat Chat { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Party Finder functions
|
||||||
|
/// </summary>
|
||||||
public PartyFinder PartyFinder { get; }
|
public PartyFinder PartyFinder { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// BattleTalk functions and events
|
||||||
|
/// </summary>
|
||||||
public BattleTalk BattleTalk { get; }
|
public BattleTalk BattleTalk { get; }
|
||||||
|
|
||||||
internal GameFunctions(Hooks hooks, SigScanner scanner, SeStringManager seStringManager) {
|
internal GameFunctions(Hooks hooks, SigScanner scanner, SeStringManager seStringManager) {
|
||||||
@ -27,11 +41,16 @@ namespace XivCommon {
|
|||||||
this.BattleTalk = new BattleTalk(this, scanner, seStringManager, hooks.HasFlag(Hooks.BattleTalk));
|
this.BattleTalk = new BattleTalk(this, scanner, seStringManager, hooks.HasFlag(Hooks.BattleTalk));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
this.BattleTalk.Dispose();
|
this.BattleTalk.Dispose();
|
||||||
this.PartyFinder.Dispose();
|
this.PartyFinder.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the pointer to the UI module
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Pointer</returns>
|
||||||
public IntPtr GetUiModule() {
|
public IntPtr GetUiModule() {
|
||||||
return this.InternalGetUiModule(Marshal.ReadIntPtr(this.UiModulePtr));
|
return this.InternalGetUiModule(Marshal.ReadIntPtr(this.UiModulePtr));
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace XivCommon {
|
namespace XivCommon {
|
||||||
|
/// <summary>
|
||||||
|
/// Flags for which hooks to use
|
||||||
|
/// </summary>
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum Hooks {
|
public enum Hooks {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2,13 +2,30 @@
|
|||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
|
|
||||||
namespace XivCommon {
|
namespace XivCommon {
|
||||||
|
/// <summary>
|
||||||
|
/// A base class for accessing XivCommon functionality.
|
||||||
|
/// </summary>
|
||||||
public class XivCommonBase : IDisposable {
|
public class XivCommonBase : IDisposable {
|
||||||
|
/// <summary>
|
||||||
|
/// Game functions and events
|
||||||
|
/// </summary>
|
||||||
public GameFunctions Functions { get; }
|
public GameFunctions Functions { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// Construct a new XivCommon base.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// This will automatically enable hooks based on the hooks parameter.
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="interface">The <see cref="DalamudPluginInterface"/> of the plugin constructing this base</param>
|
||||||
|
/// <param name="hooks">Flags indicating which hooks to enable</param>
|
||||||
public XivCommonBase(DalamudPluginInterface @interface, Hooks hooks = HooksExt.DefaultHooks) {
|
public XivCommonBase(DalamudPluginInterface @interface, Hooks hooks = HooksExt.DefaultHooks) {
|
||||||
this.Functions = new GameFunctions(hooks, @interface.TargetModuleScanner, @interface.SeStringManager);
|
this.Functions = new GameFunctions(hooks, @interface.TargetModuleScanner, @interface.SeStringManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
this.Functions.Dispose();
|
this.Functions.Dispose();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user