fix: xml docs

feat: use label
develop
CrackThrough 2022-11-06 22:11:11 +09:00
parent 9d97a7ce72
commit 58581a7c53
2 changed files with 20 additions and 7 deletions

View File

@ -8,17 +8,21 @@ namespace SkyHook
public struct SkyHookEvent
{
/// <summary>
/// When the key was pressed
/// When the key was pressed.
/// </summary>
public readonly ulong Time;
/// <summary>
/// The key is pressed or released
/// The key is pressed or released.
/// </summary>
public readonly EventType Type;
/// <summary>
/// The key number that was pressed or released
/// The identified key label from the native assembly.
/// </summary>
public readonly uint Key;
public readonly ushort Label;
/// <summary>
/// The key number that was pressed or released.
/// </summary>
public readonly ushort Key;
}
public enum EventType

View File

@ -13,7 +13,8 @@ namespace SkyHook
public static bool IsFocused;
/// <summary>
/// Whether or not the event will be received only if the game window is focused.
/// Whether or the event will be received only if the game window is focused.
/// Note that only down key events will be ignored.
/// </summary>
// ReSharper disable once MemberCanBePrivate.Global
// ReSharper disable once FieldCanBeMadeReadOnly.Global
@ -22,13 +23,15 @@ namespace SkyHook
public bool isHookActive;
/// <summary>
/// The key updated event data
/// Your callback for each key updated events.
/// Use <see cref="UnityEvent.AddListener"/> to register your callback.
/// </summary>
// ReSharper disable once MemberCanBePrivate.Global
public static readonly UnityEvent<SkyHookEvent> KeyUpdated = new();
/// <summary>
/// The instance of sky hook manager. The instance will be created if it does not exist
/// The instance of <see cref="SkyHookManager"/>.
/// A new instance will be created if it does not exist.
/// </summary>
// ReSharper disable once MemberCanBePrivate.Global
public static SkyHookManager Instance
@ -105,11 +108,17 @@ namespace SkyHook
isHookActive = false;
}
/// <summary>
/// Starts the native hook.
/// </summary>
public static void StartHook()
{
Instance._StartHook();
}
/// <summary>
/// Stops the native hook.
/// </summary>
public static void StopHook()
{
Instance._StopHook();