Difference between revisions of "Input Pointers"

From PowerUI
Jump to: navigation, search
(Created page with "An input pointer is [https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events#term_pointer any kind of pointing device] which presses, hovers, or both. A mouse, a finge...")
 
(Mouse Input)
Line 3: Line 3:
 
== Mouse Input ==
 
== Mouse Input ==
  
PowerUI assumes that only a desktop platform will have a mouse. A MousePointer is created when it's running on a desktop and PowerUI.Input.CreateSystemMouse is true ''(the default)''. If your project doesn't use a mouse pointer on a desktop platform (it's [[Virtual Reality Cameras|virtual reality]] for example), you'd remove it by setting CreateSystemMouse to false in an Awake method.
+
PowerUI assumes that only a desktop platform will have a mouse. A [http://powerui.kulestar.com/powerdocs-2_0/classPowerUI_1_1MousePointer.html MousePointer] is created when it's running on a desktop and [http://powerui.kulestar.com/powerdocs-2_0/classPowerUI_1_1Input.html#a7527e2574ccda7fb7cdd2d8a28fff6db PowerUI.Input.CreateSystemMouse] is true ''(the default)''. If your project doesn't use a mouse pointer on a desktop platform (it's [[Virtual Reality Cameras|virtual reality]] for example), you'd remove it by setting [http://powerui.kulestar.com/powerdocs-2_0/classPowerUI_1_1Input.html#a7527e2574ccda7fb7cdd2d8a28fff6db CreateSystemMouse] to false in an Awake method.
  
 
== Touch and Stylus Input ==
 
== Touch and Stylus Input ==

Revision as of 22:08, 7 March 2017

An input pointer is any kind of pointing device which presses, hovers, or both. A mouse, a finger and a stylus are the three main ones. They are related to the (draft) W3C Pointer Events specification. Here's some specific notes about the input pointers available in PowerUI.

Mouse Input

PowerUI assumes that only a desktop platform will have a mouse. A MousePointer is created when it's running on a desktop and PowerUI.Input.CreateSystemMouse is true (the default). If your project doesn't use a mouse pointer on a desktop platform (it's virtual reality for example), you'd remove it by setting CreateSystemMouse to false in an Awake method.

Touch and Stylus Input

PowerUI handles multi-touch input by default on any platform which supports it. It will automatically stack with a mouse input on desktops which also have touchscreens. Each time a new touch is detected, a FingerPointer or a StylusPointer is created. They fire the various touch events as well as mouse events.

All pointers are primary (which means they all fire those mouse events too).

Virtual Reality

PowerUI has a custom input pointer, a CameraPointer, for virtual reality. See the article relating to virtual reality camera's.

Source locations

You'll find the implementations of MousePointer, FingerPointer etc here:

  • PowerUI/Source/Engine/Input/