arcade icon indicating copy to clipboard operation
arcade copied to clipboard

Encapsulate relative position logic in UITextInput.on_event

Open pushfoo opened this issue 1 year ago • 1 comments

  • Add relative position helpers
  • Use position helpers to clean up UITextInput.on_event
  • Some light refactoring for readability
  • Improve related docstrings and comments

pushfoo avatar Jul 29 '24 00:07 pushfoo

@DigiDuncan Let me know if the relative position helper seems to belong in Rect or if I somehow missed one like it already existing.

pushfoo avatar Jul 29 '24 00:07 pushfoo

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.

eruvanos avatar Feb 15 '25 16:02 eruvanos

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:

  1. I need to in general
  2. Dragon's "use rect" suggestion seemed to consume more operations at first glance
  3. The fact I said "seemed" means we need to bench it

pushfoo avatar Feb 15 '25 20:02 pushfoo