Encapsulate relative position logic in UITextInput.on_event
- Add relative position helpers
- Use position helpers to clean up UITextInput.on_event
- Some light refactoring for readability
- Improve related docstrings and comments
@DigiDuncan Let me know if the relative position helper seems to belong in Rect or if I somehow missed one like it already existing.
Hi, I am unsure about the state of the changes, due to the conflicts and the lag of an open issue, I would maybe close this PR? @pushfoo let me know, if you thing the UITextInput requires the refactoring, from my point of view, right now it is kind of explicit. But I am always open for a second opinion.
I would close this PR TL;DR: Agreed.
This thing was an exploratory kludge. I want to review your recent UI event proposals for controllers before attempting this + thoroughly review Rect since:
- I need to in general
- Dragon's "use rect" suggestion seemed to consume more operations at first glance
- The fact I said "seemed" means we need to bench it