osu-framework
osu-framework copied to clipboard
Improve iOS text input deactivation to not require long delay
Something I found which is outdated by now given the refactors of TextInputSource, and which bugged me with its delay on hide (almost feels like the game is slow enough to hide the keyboard). Also resolves the TODO item at the same time.
Before:
https://user-images.githubusercontent.com/22781491/166139753-88cde4d4-786d-4875-9cd2-fd88ff7e7cce.mov
After:
https://user-images.githubusercontent.com/22781491/166139751-2803a330-4200-4660-ac61-44fe7250f9dd.mov
Relying on the InputThread scheduler may feel a bit weird, but it is about the only managed way for letting something wait one frame before it is invoked, and able to be cancelled by other operations beforehand.
Is this PR superseded by #5150?
For the most part, if #5150 gets merged then all that's left is just cleaning up iOS here to not have any delay and becoming/resigning first responder directly instead.
So that PR should be merged first?
Yeah, this originally was just working around the issue which that PR intends to actually solve. So since it has been PR'd, I will wait for it to be merged and update this accordingly.