This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add game pad or keyboard click event.
- Loading branch information
1 parent
d7e35c8
commit 6dc943f
Showing
14 changed files
with
405 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Dalamud.Game.ClientState.GamePad; | ||
using Dalamud.Game.ClientState.Keys; | ||
|
||
namespace RotationSolver.Basic.Data; | ||
|
||
public record KeyRecord(VirtualKey key, bool control, bool alt, bool shift); | ||
public record ButtonRecord(GamepadButtons button, bool l2, bool r2); | ||
|
||
public static class RecordExtension | ||
{ | ||
public static string ToStr(this ButtonRecord record) | ||
{ | ||
string result = ""; | ||
if (record.l2) result += "LT + "; | ||
if (record.r2) result += "RT + "; | ||
return result + record.button.ToString(); | ||
} | ||
|
||
public static string ToStr(this KeyRecord record) | ||
{ | ||
string result = ""; | ||
if (record.control) result += "Ctrl + "; | ||
if (record.alt) result += "Alt + "; | ||
if (record.shift) result += "Shift + "; | ||
return result + record.key.ToString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,5 +42,4 @@ private static bool MovingDetour(IntPtr ptr) | |
} | ||
return movingHook.Original(ptr); | ||
} | ||
|
||
} |
Oops, something went wrong.