fix: use better input detection
This commit is contained in:
@@ -314,21 +314,19 @@ internal sealed unsafe class Chat : IDisposable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var focus = this._getFocus(AtkStage.GetSingleton());
|
// 6.08: CB8F27
|
||||||
if (focus == IntPtr.Zero) {
|
var isTextInputActivePtr = *(bool**) ((IntPtr) AtkStage.GetSingleton() + 0x28) + 0x188E;
|
||||||
Decrement();
|
if (isTextInputActivePtr == null) {
|
||||||
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)) {
|
|
||||||
Decrement();
|
Decrement();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*isTextInputActivePtr) {
|
||||||
this._inputFocused = true;
|
this._inputFocused = true;
|
||||||
this._graceFrames = 60;
|
this._graceFrames = 60;
|
||||||
|
} else {
|
||||||
|
Decrement();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateKeybinds() {
|
private void UpdateKeybinds() {
|
||||||
|
|||||||
Reference in New Issue
Block a user