Tanoda
Leap.Unity.InputModule.CompressibleUI Class Reference
Inheritance diagram for Leap.Unity.InputModule.CompressibleUI:
Leap.Unity.InputModule.ILeapWidget

Classes

struct  Layer
 

Public Member Functions

void HoverDistance (float distance)
 
void Expand ()
 
void Retract ()
 
void DivideLayerHeightsOnToggle (Toggle toggle)
 
void Expand ()
 
void Retract ()
 
void HoverDistance (float distance)
 

Public Attributes

Layer[] Layers
 
float ExpandSpeed = 0.1f
 
float ContractSpeed = 0.1f
 
float PushPaddingDistance = 0.01f
 
UnityEvent LayerDepress
 
UnityEvent LayerCollapse
 
UnityEvent LayerExpand
 

Detailed Description

Supports layer-based, compressible animations that lend a 3D affordance to otherwise flat UI elements. The CompressibleUI script lets you separate the components of a UI and individual controls into floating layers that depress when the user touches them. The CompressibleUI can make it easier for a user to use a control.

Definition at line 22 of file CompressibleUI.cs.

Member Function Documentation

◆ DivideLayerHeightsOnToggle()

void Leap.Unity.InputModule.CompressibleUI.DivideLayerHeightsOnToggle ( Toggle  toggle)

Definition at line 216 of file CompressibleUI.cs.

◆ Expand()

void Leap.Unity.InputModule.CompressibleUI.Expand ( )

Move the layer members to their, extended, floating positions.

Implements Leap.Unity.InputModule.ILeapWidget.

Definition at line 203 of file CompressibleUI.cs.

◆ HoverDistance()

void Leap.Unity.InputModule.CompressibleUI.HoverDistance ( float  distance)

Manually sets the current hover distance.

Parameters
distancethe distance above the base of the button in millimeters.

Implements Leap.Unity.InputModule.ILeapWidget.

Definition at line 197 of file CompressibleUI.cs.

◆ Retract()

void Leap.Unity.InputModule.CompressibleUI.Retract ( )

Restore the layer members to their non-floating positions.

Implements Leap.Unity.InputModule.ILeapWidget.

Definition at line 209 of file CompressibleUI.cs.

Member Data Documentation

◆ ContractSpeed

float Leap.Unity.InputModule.CompressibleUI.ContractSpeed = 0.1f

How fast the layer will move to its retracted position.

Definition at line 75 of file CompressibleUI.cs.

◆ ExpandSpeed

float Leap.Unity.InputModule.CompressibleUI.ExpandSpeed = 0.1f

How fast the layer will move to its distended position.

Definition at line 72 of file CompressibleUI.cs.

◆ LayerCollapse

UnityEvent Leap.Unity.InputModule.CompressibleUI.LayerCollapse

Dispatched when the layer retracts, if TriggerLayerEvent is set to true.

Definition at line 86 of file CompressibleUI.cs.

◆ LayerDepress

UnityEvent Leap.Unity.InputModule.CompressibleUI.LayerDepress

Dispatched when the layer is depressed, if TriggerLayerEvent is set to true.

Definition at line 83 of file CompressibleUI.cs.

◆ LayerExpand

UnityEvent Leap.Unity.InputModule.CompressibleUI.LayerExpand

Dispatched when the layer expands, if TriggerLayerEvent is set to true.

Definition at line 89 of file CompressibleUI.cs.

◆ Layers

Layer [] Leap.Unity.InputModule.CompressibleUI.Layers

The layers created for this CompressibleUI instance. All layers move together, but can have different float distances.

Definition at line 25 of file CompressibleUI.cs.

◆ PushPaddingDistance

float Leap.Unity.InputModule.CompressibleUI.PushPaddingDistance = 0.01f

Padding added before a control enters the hovered state.

Definition at line 78 of file CompressibleUI.cs.


The documentation for this class was generated from the following file: