docs: finish documenting all public members
This commit is contained in:
parent
153ecdccaa
commit
0215747a4c
|
@ -6,11 +6,17 @@ using Dalamud.Hooking;
|
|||
using Dalamud.Plugin;
|
||||
|
||||
namespace XivCommon.Functions {
|
||||
/// <summary>
|
||||
/// The class containing BattleTalk functionality
|
||||
/// </summary>
|
||||
public class BattleTalk : IDisposable {
|
||||
private GameFunctions Functions { get; }
|
||||
private SeStringManager SeStringManager { 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);
|
||||
|
||||
/// <summary>
|
||||
|
@ -44,6 +50,7 @@ namespace XivCommon.Functions {
|
|||
this.AddBattleTalkHook.Enable();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose() {
|
||||
this.AddBattleTalkHook?.Dispose();
|
||||
}
|
||||
|
@ -115,6 +122,9 @@ namespace XivCommon.Functions {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Options for displaying a BattleTalk window.
|
||||
/// </summary>
|
||||
public class BattleTalkOptions {
|
||||
/// <summary>
|
||||
/// Duration to display the window, in seconds.
|
||||
|
@ -127,6 +137,9 @@ namespace XivCommon.Functions {
|
|||
public BattleTalkStyle Style { get; set; } = BattleTalkStyle.Normal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BattleTalk window styles.
|
||||
/// </summary>
|
||||
public enum BattleTalkStyle : byte {
|
||||
/// <summary>
|
||||
/// A normal battle talk window with a white background.
|
||||
|
|
|
@ -5,6 +5,9 @@ using System.Text;
|
|||
using Dalamud.Game;
|
||||
|
||||
namespace XivCommon.Functions {
|
||||
/// <summary>
|
||||
/// A class containing chat functionality
|
||||
/// </summary>
|
||||
public class Chat {
|
||||
private GameFunctions Functions { get; }
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@ using Dalamud.Game;
|
|||
using Dalamud.Hooking;
|
||||
|
||||
namespace XivCommon.Functions {
|
||||
/// <summary>
|
||||
/// A class containing Party Finder functionality
|
||||
/// </summary>
|
||||
public class PartyFinder : IDisposable {
|
||||
private delegate byte RequestPartyFinderListingsDelegate(IntPtr agent, byte categoryIdx);
|
||||
|
||||
|
@ -28,6 +31,7 @@ namespace XivCommon.Functions {
|
|||
this.RequestPfListingsHook.Enable();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose() {
|
||||
this.RequestPfListingsHook?.Dispose();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@ using Dalamud.Game.Text.SeStringHandling;
|
|||
using XivCommon.Functions;
|
||||
|
||||
namespace XivCommon {
|
||||
/// <summary>
|
||||
/// A class containing game functions
|
||||
/// </summary>
|
||||
public class GameFunctions : IDisposable {
|
||||
private IntPtr UiModulePtr { get; }
|
||||
|
||||
|
@ -12,8 +15,19 @@ namespace XivCommon {
|
|||
|
||||
private GetUiModuleDelegate InternalGetUiModule { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Chat functions
|
||||
/// </summary>
|
||||
public Chat Chat { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Party Finder functions
|
||||
/// </summary>
|
||||
public PartyFinder PartyFinder { get; }
|
||||
|
||||
/// <summary>
|
||||
/// BattleTalk functions and events
|
||||
/// </summary>
|
||||
public BattleTalk BattleTalk { get; }
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose() {
|
||||
this.BattleTalk.Dispose();
|
||||
this.PartyFinder.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the pointer to the UI module
|
||||
/// </summary>
|
||||
/// <returns>Pointer</returns>
|
||||
public IntPtr GetUiModule() {
|
||||
return this.InternalGetUiModule(Marshal.ReadIntPtr(this.UiModulePtr));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
using System;
|
||||
|
||||
namespace XivCommon {
|
||||
/// <summary>
|
||||
/// Flags for which hooks to use
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum Hooks {
|
||||
/// <summary>
|
||||
|
|
|
@ -2,13 +2,30 @@
|
|||
using Dalamud.Plugin;
|
||||
|
||||
namespace XivCommon {
|
||||
/// <summary>
|
||||
/// A base class for accessing XivCommon functionality.
|
||||
/// </summary>
|
||||
public class XivCommonBase : IDisposable {
|
||||
/// <summary>
|
||||
/// Game functions and events
|
||||
/// </summary>
|
||||
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) {
|
||||
this.Functions = new GameFunctions(hooks, @interface.TargetModuleScanner, @interface.SeStringManager);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose() {
|
||||
this.Functions.Dispose();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user