fix: use better input detection

This commit is contained in:
Anna 2022-02-03 20:13:20 -05:00
parent 3331c0902e
commit 7de1874a41
1 changed files with 7 additions and 9 deletions

View File

@ -314,21 +314,19 @@ internal sealed unsafe class Chat : IDisposable {
}
}
var focus = this._getFocus(AtkStage.GetSingleton());
if (focus == IntPtr.Zero) {
// 6.08: CB8F27
var isTextInputActivePtr = *(bool**) ((IntPtr) AtkStage.GetSingleton() + 0x28) + 0x188E;
if (isTextInputActivePtr == null) {
Decrement();
return;
}
var node = (AtkResNode*) focus;
var parent = node->ParentNode;
if (parent == null || (uint) parent->Type is not (1002 or 1003 or 1005 or 1007 or 1010 or 1011)) {
if (*isTextInputActivePtr) {
this._inputFocused = true;
this._graceFrames = 60;
} else {
Decrement();
return;
}
this._inputFocused = true;
this._graceFrames = 60;
}
private void UpdateKeybinds() {