Difference between revisions of "DeviceOrientationListener"

From Headbone Creative
Jump to: navigation, search
(Initial page, includes API information and categories)
 
(Updating API info)
 
Line 1: Line 1:
This script receives notifications from the [[DeviceOrientationDetector]] when the aspect ratio of the screen changes. It doesn't do a whole lot besides expose an event that passes the new aspect ratio to other listener scripts.  
+
This script receives notifications from the [[DeviceOrientationDetector]] when the size of the screen changes. It doesn't do a whole lot besides expose an event that passes the new size to other listener scripts.  
  
Currently, the following scripts use DeviceOrientationListener to do something when the aspect ratio changes:
+
Currently, the following scripts use DeviceOrientationListener listen for the event sent by this script:
 
*[[DeviceOrientationMoveOnChanged]]
 
*[[DeviceOrientationMoveOnChanged]]
  
 
== Events ==
 
== Events ==
 
The event exposed by this class has the following function signature:
 
The event exposed by this class has the following function signature:
   public delegate void OrientationChangedCallback (float aspectRatio)
+
   public delegate void OrientationChangedCallback (int screenWidth, int screenHeight);
 
=== event OrientationChangedCallback OnOrientationChanged ===
 
=== event OrientationChangedCallback OnOrientationChanged ===
This is called when the aspect ratio is updated. The new aspect ratio is passed in.  
+
This is called when the screen size is updated. The new size is passed in.  
  
  

Latest revision as of 03:07, 18 April 2013

This script receives notifications from the DeviceOrientationDetector when the size of the screen changes. It doesn't do a whole lot besides expose an event that passes the new size to other listener scripts.

Currently, the following scripts use DeviceOrientationListener listen for the event sent by this script:

[edit] Events

The event exposed by this class has the following function signature:

  public delegate void OrientationChangedCallback (int screenWidth, int screenHeight);

[edit] event OrientationChangedCallback OnOrientationChanged

This is called when the screen size is updated. The new size is passed in.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox