PurpleKingdomGames / indigo

An FP game engine for Scala.
https://indigoengine.io/
MIT License
650 stars 60 forks source link

Merge Pointers, Mouse, and Touch in FrameContext #775

Open hobnob opened 1 month ago

hobnob commented 1 month ago

As part of #476 we should take the existing Pointers class and use it to determine mouse state and touch state, using the PointerType. This will move us towards being able to integrate easier with platforms like mobile (as we can easily filter touch events), moves us away from using mouse events (reducing the number of events Indigo needs to handle, and standardizes inputs through a single interface.

The aim here is to have Pointers as an entry point for all pointer events on the FrameContext, and then have Mouse and Touch classes that use the information stored in that class to determine events and statuses just for that type