FairyGUI.GObject
class FairyGUI.GObject
Fields and Properties:
string name
- Description: Name of the object.
object data
- Description: User defined data.
int sourceWidth
- Description: The source width of the object.
int sourceHeight
- Description: The source height of the object.
int initWidth
- Description: The initial width of the object.
int initHeight
- Description: The initial height of the object.
int minWidth
- Description:
int maxWidth
- Description:
int minHeight
- Description:
int maxHeight
- Description:
UnityEngine.Rect? dragBounds
- Description: Restricted range of dragging.
string id
- Description: This is an identifier used internally within the system. Unlike the name, the id value is unique and will not be duplicated.
FairyGUI.Relations relations
- Description: Relations Object.
FairyGUI.GComponent parent
- Description: Parent object.
FairyGUI.DisplayObject displayObject
- Description: Lowlevel display object.
- (static)
FairyGUI.GObject FairyGUI.GObject.draggingObject
- Description: The currently active object being dragged globally.
FairyGUI.EventListener onClick
- Description: Dispatched when the object or its child was clicked.
FairyGUI.EventListener onRightClick
- Description: Dispatched when the object or its child was clicked by right mouse button. Web only.
FairyGUI.EventListener onTouchBegin
- Description: Dispatched when the finger touched the object or its child just now.
FairyGUI.EventListener onTouchMove
- Description:
FairyGUI.EventListener onTouchEnd
- Description: Dispatched when the finger was lifted from the screen or from the mouse button.
FairyGUI.EventListener onRollOver
- Description: The cursor or finger hovers over an object.
FairyGUI.EventListener onRollOut
- Description: The cursor or finger leave an object.
FairyGUI.EventListener onAddedToStage
- Description: Dispatched when the object was added to the stage.
FairyGUI.EventListener onRemovedFromStage
- Description: Dispatched when the object was removed from the stage.
FairyGUI.EventListener onKeyDown
- Description: Dispatched on key pressed when the object is in focus.
FairyGUI.EventListener onClickLink
- Description: Dispatched when links in the object or its child was clicked.
FairyGUI.EventListener onPositionChanged
- Description: Dispatched when the object was moved.
FairyGUI.EventListener onSizeChanged
- Description: Dispatched when the object was resized.
FairyGUI.EventListener onDragStart
- Description: Dispatched when drag start.
FairyGUI.EventListener onDragMove
- Description: Dispatched when dragging.
FairyGUI.EventListener onDragEnd
- Description: Dispatched when drag end.
FairyGUI.EventListener onGearStop
- Description:
FairyGUI.EventListener onFocusIn
- Description:
FairyGUI.EventListener onFocusOut
- Description:
float x
- Description: The x coordinate of the object relative to the local coordinates of the parent.
float y
- Description: The y coordinate of the object relative to the local coordinates of the parent.
float z
- Description: The z coordinate of the object relative to the local coordinates of the parent.
UnityEngine.Vector2 xy
- Description: The x and y coordinates of the object relative to the local coordinates of the parent.
UnityEngine.Vector3 position
- Description: The x,y,z coordinates of the object relative to the local coordinates of the parent.
bool pixelSnapping
float width
- Description: The width of the object in pixels.
float height
- Description: The height of the object in pixels.
UnityEngine.Vector2 size
- Description: The size of the object in pixels.
float actualWidth
- Description: actualWidth = width * scalex
float actualHeight
- Description: actualHeight = height * scaleY
float xMin
- Description:
float yMin
- Description:
float scaleX
- Description: The horizontal scale factor. '1' means no scale, cannt be negative.
float scaleY
- Description: The vertical scale factor. '1' means no scale, cannt be negative.
UnityEngine.Vector2 scale
- Description: The scale factor.
UnityEngine.Vector2 skew
- Description:
float pivotX
- Description: The x coordinate of the object's origin in its own coordinate space.
float pivotY
- Description: The y coordinate of the object's origin in its own coordinate space.
UnityEngine.Vector2 pivot
- Description: The x and y coordinates of the object's origin in its own coordinate space.
bool pivotAsAnchor
bool touchable
- Description: If the object can touch or click. GImage/GTextField is not touchable even it is true.
bool grayed
- Description: If true, apply a grayed effect on this object.
bool enabled
- Description: Enabled is shortcut for grayed and !touchable combination.
float rotation
- Description: The rotation around the z axis of the object in degrees.
float rotationX
- Description: The rotation around the x axis of the object in degrees.
float rotationY
- Description: The rotation around the y axis of the object in degrees.
float alpha
- Description: The opacity of the object. 0 = transparent, 1 = opaque.
bool visible
- Description: The visibility of the object. An invisible object will be untouchable.
int sortingOrder
- Description: By default(when sortingOrder==0), object added to component is arrange by the added roder. The bigger is the sorting order, the object is more in front.
bool focusable
- Description: If the object can be focused?
bool tabStop
- Description: If the object can be navigated by TAB?
bool focused
- Description: If the object is focused.
string tooltips
- Description: Tooltips of this object. UIConfig.tooltipsWin must be set first.
string cursor
- Description:
FairyGUI.BlendMode blendMode
- Description:
string gameObjectName
- Description: Sets the name of the GameObject.
bool inContainer
- Description: If the object has lowlevel displayobject and the displayobject has a container parent?
bool onStage
- Description: If the object is on stage.
string resourceURL
- Description: Resource url of this object.
FairyGUI.GGroup group
- Description: Group belonging to.
FairyGUI.GRoot root
- Description:
string text
- Description:
string icon
- Description:
bool draggable
- Description:
bool dragging
- Description:
bool isDisposed
- Description:
FairyGUI.GImage asImage
- Description:
FairyGUI.GComponent asCom
- Description:
FairyGUI.GButton asButton
- Description:
FairyGUI.GLabel asLabel
- Description:
FairyGUI.GProgressBar asProgress
- Description:
FairyGUI.GSlider asSlider
- Description:
FairyGUI.GComboBox asComboBox
- Description:
FairyGUI.GTextField asTextField
- Description:
FairyGUI.GRichTextField asRichTextField
- Description:
FairyGUI.GTextInput asTextInput
- Description:
FairyGUI.GLoader asLoader
- Description:
FairyGUI.GList asList
- Description:
FairyGUI.GGraph asGraph
- Description:
FairyGUI.GGroup asGroup
- Description:
FairyGUI.GMovieClip asMovieClip
- Description:
Constructors:
FairyGUI.GObject.New()
Methods:
void SetXY(float, float)
- Description: change the x and y coordinates of the object relative to the local coordinates of the parent.
- Parameter xv: x value.
- Parameter yv: y value.
void SetXY(float, float, bool)
- Description:
- Parameter xv:
- Parameter yv:
- Parameter topLeft:
void SetPosition(float, float, float)
- Description: change the x,y,z coordinates of the object relative to the local coordinates of the parent.
- Parameter xv: x value.
- Parameter yv: y value.
- Parameter zv: z value.
void Center()
- Description: Set the object in middle of the parent or GRoot if the parent is not set.
void Center(bool)
- Description: Set the object in middle of the parent or GRoot if the parent is not set.
- Parameter restraint: Add relations to maintain the center state.
void MakeFullScreen()
- Description: Set the object to full screen size (logical screen)
void SetSize(float, float)
- Description: Change size.
- Parameter wv: Width value.
- Parameter hv: Height value.
void SetSize(float, float, bool)
- Description: Change size.
- Parameter wv: Width value.
- Parameter hv: Height value.
- Parameter ignorePivot: If pivot is set, the object's positon will change when its size change. Set ignorePivot=true to keep the position.
void SetScale(float, float)
- Description: Change the scale factor.
- Parameter wv: The horizontal scale factor.
- Parameter hv: The vertical scale factor
void SetPivot(float, float)
- Description: Change the x and y coordinates of the object's origin in its own coordinate space.
- Parameter xv: x value in ratio
- Parameter yv: y value in ratio
void SetPivot(float, float, bool)
- Description: Change the x and y coordinates of the object's origin in its own coordinate space.
- Parameter xv: x value in ratio
- Parameter yv: y value in ratio
- Parameter asAnchor: If use the pivot as the anchor position
void RequestFocus()
- Description: Request focus on this object.
void RequestFocus(bool)
- Description: Request focus on this object.
void SetHome(FairyGUI.GObject)
- Description:
- Parameter obj:
void InvalidateBatchingState()
- Description: Mark the fairy batching state is invalid.
void HandleControllerChanged(FairyGUI.Controller)
void AddRelation(FairyGUI.GObject, FairyGUI.RelationType)
- Description:
- Parameter target:
- Parameter relationType:
void AddRelation(FairyGUI.GObject, FairyGUI.RelationType, bool)
- Description:
- Parameter target:
- Parameter relationType:
- Parameter usePercent:
void RemoveRelation(FairyGUI.GObject, FairyGUI.RelationType)
- Description:
- Parameter target:
- Parameter relationType:
void RemoveFromParent()
- Description:
void StartDrag()
- Description:
void StartDrag(int)
- Description:
- Parameter touchId:
void StopDrag()
- Description:
UnityEngine.Vector2 LocalToGlobal(UnityEngine.Vector2)
- Description: Transforms a point from the local coordinate system to global (Stage) coordinates.
- Parameter pt:
- Return:
UnityEngine.Vector2 GlobalToLocal(UnityEngine.Vector2)
- Description: Transforms a point from global (Stage) coordinates to the local coordinate system.
- Parameter pt:
- Return:
UnityEngine.Rect LocalToGlobal(UnityEngine.Rect)
- Description:
- Parameter rect:
- Return:
UnityEngine.Rect GlobalToLocal(UnityEngine.Rect)
- Description:
- Parameter rect:
- Return:
UnityEngine.Vector2 LocalToRoot(UnityEngine.Vector2, FairyGUI.GRoot)
- Description: Transforms a point from the local coordinate system to GRoot coordinates.
- Parameter pt:
- Parameter r:
- Return:
UnityEngine.Vector2 RootToLocal(UnityEngine.Vector2, FairyGUI.GRoot)
- Description: Transforms a point from the GRoot coordinate to local coordinates system.
- Parameter pt:
- Parameter r:
- Return:
UnityEngine.Vector2 WorldToLocal(UnityEngine.Vector3)
- Description:
- Parameter pt:
- Return:
UnityEngine.Vector2 WorldToLocal(UnityEngine.Vector3, UnityEngine.Camera)
- Description:
- Parameter pt:
- Parameter camera:
- Return:
UnityEngine.Vector2 TransformPoint(UnityEngine.Vector2, FairyGUI.GObject)
- Description:
- Parameter point:
- Parameter targetSpace:
- Return:
UnityEngine.Rect TransformRect(UnityEngine.Rect, FairyGUI.GObject)
- Description:
- Parameter rect:
- Parameter targetSpace:
- Return:
void Dispose()
- Description:
void ConstructFromResource()
FairyGUI.GTweener TweenMove(UnityEngine.Vector2, float)
FairyGUI.GTweener TweenMoveX(float, float)
FairyGUI.GTweener TweenMoveY(float, float)
FairyGUI.GTweener TweenScale(UnityEngine.Vector2, float)
FairyGUI.GTweener TweenScaleX(float, float)
FairyGUI.GTweener TweenScaleY(float, float)
FairyGUI.GTweener TweenResize(UnityEngine.Vector2, float)
FairyGUI.GTweener TweenFade(float, float)
FairyGUI.GTweener TweenRotate(float, float)
FairyGUI.GTweener TweenRotateZ(float, float)
FairyGUI.GTweener TweenFillAmount(float, float)