More keybind handling improvements
This commit is contained in:
@@ -23,7 +23,7 @@ tags:
|
|||||||
- Replacement
|
- Replacement
|
||||||
changelog: |-
|
changelog: |-
|
||||||
**Updates**
|
**Updates**
|
||||||
- Add hide button to chat [thanks dean]
|
- More keybind handling improvements
|
||||||
- Fix incorrect parameter for print function [thanks Limiana]
|
- Add keybinds for switching tabs [thanks dean]
|
||||||
- Improve keybind handling, maybe
|
- Add auto hide after inactivity [default false, thanks dean]
|
||||||
- Loc updates
|
- Fix auto scroll failing if custom cell padding is used [thanks zbee]
|
||||||
|
|||||||
@@ -29,8 +29,9 @@ namespace ChatTwo.GameFunctions;
|
|||||||
internal sealed unsafe class Chat : IDisposable
|
internal sealed unsafe class Chat : IDisposable
|
||||||
{
|
{
|
||||||
// Functions
|
// Functions
|
||||||
|
// Replace with <https://github.com/aers/FFXIVClientStructs/pull/1036>
|
||||||
[Signature("E8 ?? ?? ?? ?? 48 8D 4D A0 8B F8")]
|
[Signature("E8 ?? ?? ?? ?? 48 8D 4D A0 8B F8")]
|
||||||
private readonly delegate* unmanaged<nint, Utf8String*, nint, uint> GetKeybindNative = null!;
|
private readonly delegate* unmanaged<UIInputData*, Utf8String*, nint, uint> GetKeybindNative = null!;
|
||||||
|
|
||||||
[Signature("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC ?? 48 8D B9 ?? ?? ?? ?? 33 C0")]
|
[Signature("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC ?? 48 8D B9 ?? ?? ?? ?? 33 C0")]
|
||||||
private readonly delegate* unmanaged<RaptureLogModule*, ushort, Utf8String*, Utf8String*, ulong, ulong, ushort, byte, int, byte, void> PrintTellNative = null!;
|
private readonly delegate* unmanaged<RaptureLogModule*, ushort, Utf8String*, Utf8String*, ulong, ulong, ushort, byte, int, byte, void> PrintTellNative = null!;
|
||||||
@@ -537,16 +538,11 @@ internal sealed unsafe class Chat : IDisposable
|
|||||||
_ => VirtualKey.NO_KEY,
|
_ => VirtualKey.NO_KEY,
|
||||||
};
|
};
|
||||||
|
|
||||||
private Keybind? GetKeybind(string id)
|
private Keybind GetKeybind(string id)
|
||||||
{
|
{
|
||||||
var agent = (nint) AgentModule.Instance()->GetAgentByInternalId(AgentId.Configkey);
|
var outData = stackalloc byte[11];
|
||||||
var a1 = *(void**) (agent + 0x78);
|
|
||||||
if (a1 == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
var outData = stackalloc byte[32];
|
|
||||||
var idString = Utf8String.FromString(id);
|
var idString = Utf8String.FromString(id);
|
||||||
GetKeybindNative((nint) a1, idString, (nint) outData);
|
GetKeybindNative(UIInputData.Instance(), idString, (nint) outData);
|
||||||
idString->Dtor(true);
|
idString->Dtor(true);
|
||||||
|
|
||||||
var key1 = (VirtualKey) outData[0];
|
var key1 = (VirtualKey) outData[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user