NGUI: Next-Gen UI kit
3.7.2
|
Inspector class used to edit UIWidgets. More...
Public Types | |
enum | Action { Action.None, Action.Move, Action.Scale, Action.Rotate } |
Public Member Functions | |
void | OnSceneGUI () |
Draw the on-screen selection, knobs, and handle all interaction logic. More... | |
void | DrawWidgetTransform () |
Draw common widget properties that can be shown as a part of the Transform Inspector. More... | |
Public Member Functions inherited from UIRectEditor | |
override void | OnInspectorGUI () |
Draw the inspector properties. More... | |
void | DrawAnchorTransform () |
Static Public Member Functions | |
static bool | Raycast (Vector3[] corners, out Vector3 hit) |
Raycast into the screen. More... | |
static void | DrawKnob (Vector3 point, bool selected, bool canResize, int id) |
Draw a control dot at the specified world position. More... | |
static float | GetScreenDistance (Vector3 worldPos, Vector2 mousePos) |
Screen-space distance from the mouse position to the specified world position. More... | |
static float | GetScreenDistance (Vector3[] worldPoints, Vector2 mousePos, out int index) |
Closest screen-space distance from the mouse position to one of the specified world points. More... | |
static void | SetCursorRect (Rect rect, MouseCursor cursor) |
Set the mouse cursor rectangle, refreshing the screen when it gets changed. More... | |
static Vector3[] | GetHandles (Vector3[] corners) |
Convert the specified 4 corners into 8 pivot points (adding left, top, right, bottom – in that order). More... | |
static UIWidget.Pivot | GetPivotUnderMouse (Vector3[] worldPos, Event e, bool[] resizable, bool movable, ref Action action) |
Determine what kind of pivot point is under the mouse and update the cursor accordingly. More... | |
static void | DrawAnchorHandle (UIRect.AnchorPoint anchor, Transform myTrans, Vector3[] myCorners, int side, int id) |
Draw the specified anchor point. More... | |
static void | DrawColor (SerializedObject so, UIWidget w) |
Draw the widget's color. More... | |
static void | DrawInspectorProperties (SerializedObject so, UIWidget w, bool drawColor) |
Draw common widget properties. More... | |
Static Public Member Functions inherited from UIRectEditor | |
static void | UpdateHorizontalAnchor (UIRect r, UIRect.AnchorPoint anchor, bool resetRelative) |
Convenience function that switches the anchor mode and ensures that dimensions are kept intact. More... | |
static void | UpdateVerticalAnchor (UIRect r, UIRect.AnchorPoint anchor, bool resetRelative) |
Convenience function that switches the anchor mode and ensures that dimensions are kept intact. More... | |
Static Public Attributes | |
static new UIWidgetInspector | instance |
static UIWidget.Pivot[] | pivotPoints |
Static Public Attributes inherited from UIRectEditor | |
static UIRectEditor | instance |
Protected Member Functions | |
override void | OnDisable () |
Clear the instance reference. More... | |
override void | OnEnable () |
Cache the reference. More... | |
override void | DrawCustomProperties () |
All widgets have depth, color and make pixel-perfect options More... | |
override void | OnDrawFinalProperties () |
Protected Member Functions inherited from UIRectEditor | |
void | ReEvaluateAnchorType () |
Manually re-evaluate the current anchor type. More... | |
virtual bool | ShouldDrawProperties () |
virtual void | DrawFinalProperties () |
Draw the "Anchors" property block. More... | |
SerializedProperty | DrawSingleAnchorSelection () |
Draw a selection for a single target (one target sets all 4 sides) More... | |
void | DrawAnchor (int index, bool targetSelection) |
Helper function that draws the suffix after the relative fields. More... | |
void | UpdateAnchors (bool resetRelative) |
Convenience function that switches the anchor mode and ensures that dimensions are kept intact. More... | |
void | UpdateAnchor (int index, bool resetRelative) |
Convenience function that switches the anchor mode and ensures that dimensions are kept intact. More... | |
Protected Attributes | |
UIWidget | mWidget |
Protected Attributes inherited from UIRectEditor | |
AnchorType | mAnchorType = AnchorType.None |
Transform[] | mTarget = new Transform[4] |
bool[] | mCustom = new bool[] { false, false, false, false } |
Static Protected Attributes | |
static bool | mUseShader = false |
Static Protected Attributes inherited from UIRectEditor | |
static string[] | PrefixName = new string[] { "Left", "Right", "Bottom", "Top" } |
static string[] | FieldName = new string[] { "leftAnchor", "rightAnchor", "bottomAnchor", "topAnchor" } |
static string[] | HorizontalList = new string[] { "Target's Left", "Target's Center", "Target's Right", "Custom", "Set to Current Position" } |
static string[] | VerticalList = new string[] { "Target's Bottom", "Target's Center", "Target's Top", "Custom", "Set to Current Position" } |
static bool[] | IsHorizontal = new bool[] { true, true, false, false } |
Properties | |
static Color | handlesColor [get] |
Color used by the handles based on the current color scheme. More... | |
Additional Inherited Members | |
Protected Types inherited from UIRectEditor | |
enum | AnchorType { AnchorType.None, AnchorType.Unified, AnchorType.Advanced } |
Static Protected Member Functions inherited from UIRectEditor | |
static bool | IsCommon (float relative) |
Whether the specified relative offset is a common value (0, 0.5, or 1) More... | |
static bool | IsRect (SerializedProperty sp) |
Returns 'true' if the specified serialized property reference is a UIRect. More... | |
static UIRect | GetRect (SerializedProperty sp) |
Pass something like leftAnchor.target to get its rectangle reference. More... | |
static Camera | GetCamera (SerializedProperty sp) |
Pass something like leftAnchor.target to get its rectangle reference. More... | |
Inspector class used to edit UIWidgets.
|
static |
Draw the specified anchor point.
|
static |
Draw the widget's color.
|
protectedvirtual |
All widgets have depth, color and make pixel-perfect options
Reimplemented from UIRectEditor.
|
static |
Draw common widget properties.
|
static |
Draw a control dot at the specified world position.
void UIWidgetInspector.DrawWidgetTransform | ( | ) |
Draw common widget properties that can be shown as a part of the Transform Inspector.
|
static |
Convert the specified 4 corners into 8 pivot points (adding left, top, right, bottom – in that order).
|
static |
Determine what kind of pivot point is under the mouse and update the cursor accordingly.
|
static |
Screen-space distance from the mouse position to the specified world position.
|
static |
Closest screen-space distance from the mouse position to one of the specified world points.
|
protectedvirtual |
Clear the instance reference.
Reimplemented from UIRectEditor.
|
protectedvirtual |
Reimplemented from UIRectEditor.
|
protectedvirtual |
Cache the reference.
Reimplemented from UIRectEditor.
void UIWidgetInspector.OnSceneGUI | ( | ) |
Draw the on-screen selection, knobs, and handle all interaction logic.
|
static |
Raycast into the screen.
|
static |
Set the mouse cursor rectangle, refreshing the screen when it gets changed.
|
static |
|
staticprotected |
|
protected |
|
static |
|
staticget |
Color used by the handles based on the current color scheme.