Method | Description | |
---|---|---|
AdjustWidget ( UIWidget, w, float left, float bottom, float right, float top ) : void |
Adjust the widget's rectangle based on the specified modifier values.
|
|
AdjustWidget ( UIWidget, w, float left, float bottom, float right, float top, int minWidth, int minHeight ) : void |
Adjust the widget's rectangle based on the specified modifier values.
|
|
AdjustWidget ( UIWidget, w, float left, float bottom, float right, float top, int minWidth, int minHeight, int maxWidth, int maxHeight ) : void |
Adjust the widget's rectangle based on the specified modifier values.
|
|
CalculateAbsoluteWidgetBounds ( Transform trans ) : Bounds |
Calculate the combined bounds of all widgets attached to the specified game object or its children (in world space).
|
|
CalculateRelativeWidgetBounds ( Transform trans ) : Bounds |
Calculate the combined bounds of all widgets attached to the specified game object or its children (in relative-to-object space).
|
|
CalculateRelativeWidgetBounds ( Transform root, Transform child ) : Bounds |
Calculate the combined bounds of all widgets attached to the specified game object or its children (in relative-to-object space).
|
|
CalculateRelativeWidgetBounds ( Transform root, Transform child, bool considerInactive ) : Bounds |
Calculate the combined bounds of all widgets attached to the specified game object or its children (in relative-to-object space).
|
|
CalculateRelativeWidgetBounds ( Transform trans, bool considerInactive ) : Bounds |
Calculate the combined bounds of all widgets attached to the specified game object or its children (in relative-to-object space).
|
|
ConstrainRect ( Vector2 minRect, Vector2 maxRect, Vector2 minArea, Vector2 maxArea ) : Vector2 |
Constrain 'rect' to be within 'area' as much as possible, returning the Vector2 offset necessary for this to happen. This function is useful when trying to restrict one area (window) to always be within another (viewport).
|
|
ConvertToPixels ( Rect rect, int width, int height, bool round ) : Rect |
Convert from bottom-left based UV coordinates to top-left based pixel coordinates.
|
|
ConvertToTexCoords ( Rect rect, int width, int height ) : Rect |
Convert from top-left based pixel coordinates to bottom-left based UV coordinates.
|
|
DistanceToRectangle ( Vector2 screenPoints, Vector2 mousePos ) : float |
Determine the distance from the mouse position to the screen space rectangle specified by the 4 points.
|
|
DistanceToRectangle ( Vector3 worldPoints, Vector2 mousePos, Camera cam ) : float |
Determine the distance from the mouse position to the world rectangle specified by the 4 points.
|
|
GetPivot ( Vector2 offset ) : UIWidget.Pivot |
Helper function that converts the pivot offset to a pivot point.
|
|
GetPivotOffset ( UIWidget, pv ) : Vector2 |
Helper function that converts the widget's pivot enum into a 0-1 range vector.
|
|
MakePixelPerfect ( Rect rect ) : Rect |
Round the pixel rectangle's dimensions.
|
|
MakePixelPerfect ( Rect rect, int width, int height ) : Rect |
Round the texture coordinate rectangle's dimensions.
|
|
MoveRect ( UIRect, rect, float x, float y ) : void |
Adjust the rectangle's position using the specified local delta coordinates.
|
|
MoveWidget ( UIRect, w, float x, float y ) : void |
Adjust the widget's position using the specified local delta coordinates.
|
|
ResizeWidget ( UIWidget, w, UIWidget, pivot, float x, float y, int minWidth, int minHeight ) : void |
Given the specified dragged pivot point, adjust the widget's dimensions.
|
|
ResizeWidget ( UIWidget, w, UIWidget, pivot, float x, float y, int minWidth, int minHeight, int maxWidth, int maxHeight ) : void |
Given the specified dragged pivot point, adjust the widget's dimensions.
|
|
RotateTowards ( float from, float to, float maxAngle ) : float |
Since there is no Mathf.RotateTowards...
|
|
SpringDampen ( Vector2 &velocity, float strength, float deltaTime ) : Vector2 |
Same as the Vector3 version, it's a framerate-independent Lerp.
|
|
SpringDampen ( Vector3 &velocity, float strength, float deltaTime ) : Vector3 |
This code is not framerate-independent: target.position += velocity; velocity = Vector3.Lerp(velocity, Vector3.zero, Time.deltaTime * 9f); But this code is: target.position += NGUIMath.SpringDampen(ref velocity, 9f, Time.deltaTime);
|
|
SpringLerp ( Quaternion from, Quaternion to, float strength, float deltaTime ) : Quaternion |
Quaternion.Slerp(from, to, Time.deltaTime * strength) is not framerate-independent. This function is.
|
|
SpringLerp ( Vector2 from, Vector2 to, float strength, float deltaTime ) : Vector2 |
Vector2.Lerp(from, to, Time.deltaTime * strength) is not framerate-independent. This function is.
|
|
SpringLerp ( Vector3 from, Vector3 to, float strength, float deltaTime ) : Vector3 |
Vector3.Lerp(from, to, Time.deltaTime * strength) is not framerate-independent. This function is.
|
|
SpringLerp ( float strength, float deltaTime ) : float |
Calculate how much to interpolate by.
|
|
SpringLerp ( float from, float to, float strength, float deltaTime ) : float |
Mathf.Lerp(from, to, Time.deltaTime * strength) is not framerate-independent. This function is.
|
Method | Description | |
---|---|---|
ClampIndex ( int val, int max ) : int | ||
ColorToInt ( Color c ) : int | ||
DecimalToHex ( int num ) : string | ||
DecimalToHexChar ( int num ) : char | ||
DistancePointToLineSegment ( Vector2 point, Vector2 a, Vector2 b ) : float |
Determine the distance from the specified point to the line segment.
|
|
HexToColor ( uint val ) : Color | ||
HexToDecimal ( char ch ) : int | ||
IntToBinary ( int val, int bits ) : string | ||
IntToColor ( int val ) : Color | ||
Lerp ( float from, float to, float factor ) : float | ||
RepeatIndex ( int val, int max ) : int | ||
Wrap01 ( float val ) : float | ||
WrapAngle ( float angle ) : float |
static public AdjustWidget ( UIWidget, w, float left, float bottom, float right, float top ) : void | ||
w | UIWidget, | |
left | float | |
bottom | float | |
right | float | |
top | float | |
return | void |
static public AdjustWidget ( UIWidget, w, float left, float bottom, float right, float top, int minWidth, int minHeight ) : void | ||
w | UIWidget, | |
left | float | |
bottom | float | |
right | float | |
top | float | |
minWidth | int | |
minHeight | int | |
return | void |
static public AdjustWidget ( UIWidget, w, float left, float bottom, float right, float top, int minWidth, int minHeight, int maxWidth, int maxHeight ) : void | ||
w | UIWidget, | |
left | float | |
bottom | float | |
right | float | |
top | float | |
minWidth | int | |
minHeight | int | |
maxWidth | int | |
maxHeight | int | |
return | void |
static public CalculateAbsoluteWidgetBounds ( Transform trans ) : Bounds | ||
trans | Transform | |
return | Bounds |
static public CalculateRelativeWidgetBounds ( Transform trans ) : Bounds | ||
trans | Transform | |
return | Bounds |
static public CalculateRelativeWidgetBounds ( Transform root, Transform child ) : Bounds | ||
root | Transform | |
child | Transform | |
return | Bounds |
static public CalculateRelativeWidgetBounds ( Transform root, Transform child, bool considerInactive ) : Bounds | ||
root | Transform | |
child | Transform | |
considerInactive | bool | |
return | Bounds |
static public CalculateRelativeWidgetBounds ( Transform trans, bool considerInactive ) : Bounds | ||
trans | Transform | |
considerInactive | bool | |
return | Bounds |
static public ConstrainRect ( Vector2 minRect, Vector2 maxRect, Vector2 minArea, Vector2 maxArea ) : Vector2 | ||
minRect | Vector2 | |
maxRect | Vector2 | |
minArea | Vector2 | |
maxArea | Vector2 | |
return | Vector2 |
static public ConvertToPixels ( Rect rect, int width, int height, bool round ) : Rect | ||
rect | Rect | |
width | int | |
height | int | |
round | bool | |
return | Rect |
static public ConvertToTexCoords ( Rect rect, int width, int height ) : Rect | ||
rect | Rect | |
width | int | |
height | int | |
return | Rect |
static public DistanceToRectangle ( Vector2 screenPoints, Vector2 mousePos ) : float | ||
screenPoints | Vector2 | |
mousePos | Vector2 | |
return | float |
static public DistanceToRectangle ( Vector3 worldPoints, Vector2 mousePos, Camera cam ) : float | ||
worldPoints | Vector3 | |
mousePos | Vector2 | |
cam | Camera | |
return | float |
static public GetPivot ( Vector2 offset ) : UIWidget.Pivot | ||
offset | Vector2 | |
return | UIWidget.Pivot |
static public GetPivotOffset ( UIWidget, pv ) : Vector2 | ||
pv | UIWidget, | |
return | Vector2 |
static public MakePixelPerfect ( Rect rect ) : Rect | ||
rect | Rect | |
return | Rect |
static public MakePixelPerfect ( Rect rect, int width, int height ) : Rect | ||
rect | Rect | |
width | int | |
height | int | |
return | Rect |
static public MoveRect ( UIRect, rect, float x, float y ) : void | ||
rect | UIRect, | |
x | float | |
y | float | |
return | void |
static public MoveWidget ( UIRect, w, float x, float y ) : void | ||
w | UIRect, | |
x | float | |
y | float | |
return | void |
static public ResizeWidget ( UIWidget, w, UIWidget, pivot, float x, float y, int minWidth, int minHeight ) : void | ||
w | UIWidget, | |
pivot | UIWidget, | |
x | float | |
y | float | |
minWidth | int | |
minHeight | int | |
return | void |
static public ResizeWidget ( UIWidget, w, UIWidget, pivot, float x, float y, int minWidth, int minHeight, int maxWidth, int maxHeight ) : void | ||
w | UIWidget, | |
pivot | UIWidget, | |
x | float | |
y | float | |
minWidth | int | |
minHeight | int | |
maxWidth | int | |
maxHeight | int | |
return | void |
static public RotateTowards ( float from, float to, float maxAngle ) : float | ||
from | float | |
to | float | |
maxAngle | float | |
return | float |
static public SpringDampen ( Vector2 &velocity, float strength, float deltaTime ) : Vector2 | ||
velocity | Vector2 | |
strength | float | |
deltaTime | float | |
return | Vector2 |
static public SpringDampen ( Vector3 &velocity, float strength, float deltaTime ) : Vector3 | ||
velocity | Vector3 | |
strength | float | |
deltaTime | float | |
return | Vector3 |
static public SpringLerp ( Quaternion from, Quaternion to, float strength, float deltaTime ) : Quaternion | ||
from | Quaternion | |
to | Quaternion | |
strength | float | |
deltaTime | float | |
return | Quaternion |
static public SpringLerp ( Vector2 from, Vector2 to, float strength, float deltaTime ) : Vector2 | ||
from | Vector2 | |
to | Vector2 | |
strength | float | |
deltaTime | float | |
return | Vector2 |
static public SpringLerp ( Vector3 from, Vector3 to, float strength, float deltaTime ) : Vector3 | ||
from | Vector3 | |
to | Vector3 | |
strength | float | |
deltaTime | float | |
return | Vector3 |
static public SpringLerp ( float strength, float deltaTime ) : float | ||
strength | float | |
deltaTime | float | |
return | float |
static public SpringLerp ( float from, float to, float strength, float deltaTime ) : float | ||
from | float | |
to | float | |
strength | float | |
deltaTime | float | |
return | float |