NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
UITextureInspector Class Reference

Inspector class used to edit UITextures. More...

Inheritance diagram for UITextureInspector:
UIBasicSpriteEditor UIWidgetInspector UIRectEditor

Public Member Functions

override bool HasPreviewGUI ()
 Allow the texture to be previewed. More...
 
override void OnPreviewGUI (Rect rect, GUIStyle background)
 Draw the sprite preview. More...
 
- Public Member Functions inherited from UIWidgetInspector
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 ()
 

Protected Member Functions

override void OnEnable ()
 Determine the initial anchor type. More...
 
override bool ShouldDrawProperties ()
 
- Protected Member Functions inherited from UIBasicSpriteEditor
override void DrawCustomProperties ()
 Draw all the custom properties such as sprite type, flip setting, fill direction, etc. More...
 
- Protected Member Functions inherited from UIWidgetInspector
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 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...
 

Additional Inherited Members

- Public Types inherited from UIWidgetInspector
enum  Action { Action.None, Action.Move, Action.Scale, Action.Rotate }
 
- Static Public Member Functions inherited from UIWidgetInspector
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 inherited from UIWidgetInspector
static new UIWidgetInspector instance
 
static UIWidget.Pivot[] pivotPoints
 
- Static Public Attributes inherited from UIRectEditor
static UIRectEditor instance
 
- 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...
 
- Protected Attributes inherited from UIWidgetInspector
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 inherited from UIWidgetInspector
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 inherited from UIWidgetInspector
static Color handlesColor [get]
 Color used by the handles based on the current color scheme. More...
 

Detailed Description

Inspector class used to edit UITextures.

Member Function Documentation

override bool UITextureInspector.HasPreviewGUI ( )

Allow the texture to be previewed.

override void UITextureInspector.OnEnable ( )
protectedvirtual

Determine the initial anchor type.

Reimplemented from UIRectEditor.

override void UITextureInspector.OnPreviewGUI ( Rect  rect,
GUIStyle  background 
)

Draw the sprite preview.

override bool UITextureInspector.ShouldDrawProperties ( )
protectedvirtual

Reimplemented from UIRectEditor.


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