owned this note changed 3 months ago
Published Linked with GitHub

Problem: pressing buttons without clicking on them (hotkeys, focus)

Aevyrie's thoughts:

  • multiple ways to do a lot of things with UI
  • thing I'm trying to do is an abstraction level above picking
  • options: create an Interact event, mock picking events, another abstraction layer within picking?
  • rough idea: keep existing types for Pointer<Click> etc, but generate them from a lower level tool. Move physical picking data into an Option.
  • picking is generally in a pretty solid spot: capable and robust

PointerId:

  • Alice: does not like Custom variant: Uuid is very complex without a lot of justification
  • Alice: would like to pass in standardized information about mocked picking events (hotkey, focus etc)
  • Aevyrie: exists to give a stable ID for the hovermap (entity isn't suitable for touches etc)
  • Aevyrie: custom uses a Uuid because might be used for testing etc and avoid conflicts
  • Aevyrie: needs to decouple stable ID vs type of input
  • Aevyrie: duplicating pointers happens with viewports
  • Aevyrie: ID must be stable for a given input device and context

Plan:

  1. Refactor PointerId to split apart kind (Mouse, Touch, Virtual) and identifier, removing Custom variant.
  2. Revise and merge physical mocking approach from https://github.com/bevyengine/bevy/pull/17399.
  3. Long-term: think about moving pointer event abstractions up a level, or adding semantic UI actions.
Select a repo