O'Reilly logo

Learning Windows 8 Game Development by Michael Quandt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pointers

Touch screens are defining the current generation of devices, and to make supporting these devices easier we have a new API that combines touch, mouse, and pen input into the Pointer API. This API abstracts the type of the device away so that you can focus on the common aspect between the three different devices, the actual pointer. Unless you need built-in gestures, using the Pointer API is your best option to cover both the mouse and touch screen in one go.

The pointer events provided by Windows are exposed through the CoreWindow object that we have in our GameApplication class (this inherits from the IFrameworkView); you'll see two of them there already: OnPointerPressed and OnPointerMoved. Let's add one more to support all of the main ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required