GRoot Methods |
The GRoot type exposes the following members.
Name | Description | |
---|---|---|
AddChild |
Add a child to the component. It will be at the frontmost position.
(Inherited from GComponent.) | |
AddChildAt |
Adds a child to the component at a certain index.
(Inherited from GComponent.) | |
AddController |
Adds a controller to the container.
(Inherited from GComponent.) | |
AddEventListener(String, EventCallback0) | (Inherited from EventDispatcher.) | |
AddEventListener(String, EventCallback1) | (Inherited from EventDispatcher.) | |
AddRelation(GObject, RelationType) | (Inherited from GObject.) | |
AddRelation(GObject, RelationType, Boolean) | (Inherited from GObject.) | |
ApplyContentScaleFactor |
This is called after screen size changed.
| |
BringToFront |
将一个窗口提到所有窗口的最前面
| |
BroadcastEvent | (Inherited from EventDispatcher.) | |
BubbleEvent | (Inherited from EventDispatcher.) | |
Center() |
Set the object in middle of the parent or GRoot if the parent is not set.
(Inherited from GObject.) | |
Center(Boolean) |
Set the object in middle of the parent or GRoot if the parent is not set.
(Inherited from GObject.) | |
CloseAllExceptModals |
Close all windows except modal windows.
| |
CloseAllWindows |
Close all windows.
| |
CloseModalWait |
Hide modal layer and waiting sign.
| |
ConstructFromResource | (Inherited from GComponent.) | |
ConstructFromXML |
Method for extensions to override
(Inherited from GComponent.) | |
DisableSound | ||
DispatchEvent(String) | (Inherited from EventDispatcher.) | |
DispatchEvent(EventContext) | (Inherited from EventDispatcher.) | |
DispatchEvent(String, Object) | (Inherited from EventDispatcher.) | |
DispatchEvent(String, Object, Object) | (Inherited from EventDispatcher.) | |
DisplayObjectToGObject | ||
Dispose | (Inherited from GComponent.) | |
EnableSound | ||
EnsureBoundsCorrect |
Make sure the bounds of the component is correct.
Bounds of the component is not updated on every changed. For example, you add a new child to the list, children in the list will be rearranged in next frame.
If you want to access the correct child position immediatelly, call this function first.
(Inherited from GComponent.) | |
GetChild |
Returns a child object with a certain name.
(Inherited from GComponent.) | |
GetChildAt |
Returns a child object at a certain index. If index out of bounds, exception raised.
(Inherited from GComponent.) | |
GetChildIndex |
Returns the index of a child within the container, or "-1" if it is not found.
(Inherited from GComponent.) | |
GetChildInGroup |
Returns a child object belong to a group with a certain name.
(Inherited from GComponent.) | |
GetChildren |
Returns a copy of all children with an array.
(Inherited from GComponent.) | |
GetController |
Returns a controller object with a certain name.
(Inherited from GComponent.) | |
GetControllerAt |
Returns a controller object at a certain index.
(Inherited from GComponent.) | |
GetFirstChildInView | (Inherited from GComponent.) | |
GetGear | (Inherited from GObject.) | |
GetPoupPosition | ||
GetTopWindow |
Get window on top.
| |
GetTransition |
Returns a transition object at a certain name.
(Inherited from GComponent.) | |
GetTransitionAt |
Returns a transition object at a certain index.
(Inherited from GComponent.) | |
GetVisibleChild |
Returns a visible child object with a certain name.
(Inherited from GComponent.) | |
GlobalToLocal(Rect) | (Inherited from GObject.) | |
GlobalToLocal(Vector2) |
Transforms a point from global (Stage) coordinates to the local coordinate system.
(Inherited from GObject.) | |
HandleControllerChanged | (Inherited from GComponent.) | |
HidePopup() |
Close all popups.
| |
HidePopup(GObject) |
Close a popup.
| |
HideTooltips | ||
HideWindow |
Call window.Hide
关闭一个窗口。将调用Window.Hide方法。
| |
HideWindowImmediately(Window) |
Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called.
立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。
| |
HideWindowImmediately(Window, Boolean) |
Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called.
立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。
| |
InvalidateBatchingState() |
Mark the fairy batching state is invalid.
(Inherited from GObject.) | |
InvalidateBatchingState(Boolean) | (Inherited from GComponent.) | |
IsAncestorOf | (Inherited from GComponent.) | |
IsChildInView |
Test if a child is in view.
(Inherited from GComponent.) | |
LocalToGlobal(Rect) | (Inherited from GObject.) | |
LocalToGlobal(Vector2) |
Transforms a point from the local coordinate system to global (Stage) coordinates.
(Inherited from GObject.) | |
LocalToRoot |
Transforms a point from the local coordinate system to GRoot coordinates.
(Inherited from GObject.) | |
MakeFullScreen |
设置对象为全屏大小(逻辑屏幕)。
(Inherited from GObject.) | |
PlayOneShotSound(AudioClip) | ||
PlayOneShotSound(AudioClip, Single) | ||
RemoveChild(GObject) |
Removes a child from the component. If the object is not a child, nothing happens.
(Inherited from GComponent.) | |
RemoveChild(GObject, Boolean) |
Removes a child from the component. If the object is not a child, nothing happens.
(Inherited from GComponent.) | |
RemoveChildAt(Int32) |
Removes a child at a certain index. Children above the child will move down.
(Inherited from GComponent.) | |
RemoveChildAt(Int32, Boolean) |
Removes a child at a certain index. Children above the child will move down.
(Inherited from GComponent.) | |
RemoveChildren() |
Remove all children.
(Inherited from GComponent.) | |
RemoveChildren(Int32, Int32, Boolean) |
Removes a range of children from the container (endIndex included).
(Inherited from GComponent.) | |
RemoveController |
Removes a controller from the container.
(Inherited from GComponent.) | |
RemoveEventListener(String, EventCallback0) | (Inherited from EventDispatcher.) | |
RemoveEventListener(String, EventCallback1) | (Inherited from EventDispatcher.) | |
RemoveEventListeners() | (Inherited from EventDispatcher.) | |
RemoveEventListeners(String) | (Inherited from EventDispatcher.) | |
RemoveFromParent | (Inherited from GObject.) | |
RemoveRelation | (Inherited from GObject.) | |
RequestFocus |
Request focus on this object.
(Inherited from GObject.) | |
RootToLocal |
Transforms a point from the GRoot coordinate to local coordinates system.
(Inherited from GObject.) | |
SetBoundsChangedFlag |
Notify the component the bounds should recaculate.
(Inherited from GComponent.) | |
SetChildIndex |
Moves a child to a certain index. Children at and after the replaced position move up.
(Inherited from GComponent.) | |
SetChildIndexBefore |
Moves a child to a certain position which is in front of the child previously at given index.
与SetChildIndex不同的是,如果child原来在index的前面,那么child插入的位置是index-1,即保证排在原来占据index的对象的前面。
(Inherited from GComponent.) | |
SetContentScaleFactor(Int32, Int32) |
Set content scale factor.
| |
SetContentScaleFactor(Int32, Int32, UIContentScaler.ScreenMatchMode) |
Set content scale factor.
| |
SetHome | (Inherited from GObject.) | |
SetPivot(Single, Single) |
Change the x and y coordinates of the object's origin in its own coordinate space.
(Inherited from GObject.) | |
SetPivot(Single, Single, Boolean) |
Change the x and y coordinates of the object's origin in its own coordinate space.
(Inherited from GObject.) | |
SetPosition |
change the x,y,z coordinates of the object relative to the local coordinates of the parent.
(Inherited from GObject.) | |
SetScale |
Change the scale factor.
(Inherited from GObject.) | |
SetSize(Single, Single) |
Change size.
(Inherited from GObject.) | |
SetSize(Single, Single, Boolean) |
Change size.
(Inherited from GObject.) | |
Setup_AfterAdd | (Inherited from GComponent.) | |
Setup_BeforeAdd | (Inherited from GObject.) | |
SetXY(Single, Single) |
change the x and y coordinates of the object relative to the local coordinates of the parent.
(Inherited from GObject.) | |
SetXY(Single, Single, Boolean) | (Inherited from GObject.) | |
ShowModalWait |
Display a modal layer and a waiting sign in the front.
显示一个半透明层和一个等待标志在最前面。半透明层的颜色可以通过UIConfig.modalLayerColor设定。
等待标志的资源可以通过UIConfig.globalModalWaiting。等待标志组件会设置为屏幕大小,请内部做好关联。
| |
ShowPopup(GObject) |
Show a popup object.
显示一个popup。
popup的特点是点击popup对象外的区域,popup对象将自动消失。
| |
ShowPopup(GObject, GObject) |
Show a popup object along with the specific target object.
显示一个popup。将popup显示在指定对象的上边或者下边。
popup的特点是点击popup对象外的区域,popup对象将自动消失。
| |
ShowPopup(GObject, GObject, Object) |
Show a popup object along with the specific target object.
显示一个popup。将popup显示在指定对象的上方或者下方。
popup的特点是点击popup对象外的区域,popup对象将自动消失。
| |
ShowTooltips | ||
ShowTooltipsWin | ||
ShowWindow |
Display a window.
| |
StartDrag() | (Inherited from GObject.) | |
StartDrag(Int32) | (Inherited from GObject.) | |
StopDrag | (Inherited from GObject.) | |
SwapChildren |
Swaps the indexes of two children.
(Inherited from GComponent.) | |
SwapChildrenAt |
Swaps the indexes of two children.
(Inherited from GComponent.) | |
TogglePopup(GObject) |
If a popup is showing, then close it; otherwise, open it.
| |
TogglePopup(GObject, GObject) | ||
TogglePopup(GObject, GObject, Object) | ||
TransformPoint | (Inherited from GObject.) | |
TransformRect | (Inherited from GObject.) | |
TweenFade | (Inherited from GObject.) | |
TweenMove | (Inherited from GObject.) | |
TweenMoveX | (Inherited from GObject.) | |
TweenMoveY | (Inherited from GObject.) | |
TweenResize | (Inherited from GObject.) | |
TweenRotate | (Inherited from GObject.) | |
TweenScale | (Inherited from GObject.) | |
TweenScaleX | (Inherited from GObject.) | |
TweenScaleY | (Inherited from GObject.) | |
WorldToLocal(Vector3) | (Inherited from GObject.) | |
WorldToLocal(Vector3, Camera) | (Inherited from GObject.) |