C# Class FairyGUI.GRoot

Inheritance: GComponent
Mostra file Open project: fairygui/FairyGUI-unity Class Usage Examples

Public Methods

Method Description
ApplyContentScaleFactor ( ) : void

This is called after screen size changed.

BringToFront ( Window win ) : void

将一个窗口提到所有窗口的最前面

CloseAllExceptModals ( ) : void

Close all windows except modal windows.

CloseAllWindows ( ) : void

Close all windows.

CloseModalWait ( ) : void

Hide modal layer and waiting sign.

DisableSound ( ) : void

DisplayObjectToGObject ( DisplayObject obj ) : GObject

EnableSound ( ) : void

GRoot ( ) : System.Collections.Generic
GetPoupPosition ( GObject popup, GObject target, object downward ) : Vector2

GetTopWindow ( ) : Window

Get window on top.

HidePopup ( ) : void

Close all popups.

HidePopup ( GObject popup ) : void

Close a popup.

HideTooltips ( ) : void

HideWindow ( Window win ) : void

Call window.Hide 关闭一个窗口。将调用Window.Hide方法。

HideWindowImmediately ( Window win ) : void

Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。

HideWindowImmediately ( Window win, bool dispose ) : void

Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。

PlayOneShotSound ( AudioClip clip ) : void

PlayOneShotSound ( AudioClip clip, float volumeScale ) : void

SetContentScaleFactor ( int designResolutionX, int designResolutionY ) : void

Set content scale factor.

SetContentScaleFactor ( int designResolutionX, int designResolutionY, UIContentScaler screenMatchMode ) : void

Set content scale factor.

ShowModalWait ( ) : void

Display a modal layer and a waiting sign in the front. 显示一个半透明层和一个等待标志在最前面。半透明层的颜色可以通过UIConfig.modalLayerColor设定。 等待标志的资源可以通过UIConfig.globalModalWaiting。等待标志组件会设置为屏幕大小,请内部做好关联。

ShowPopup ( GObject popup ) : void

Show a popup object. 显示一个popup。 popup的特点是点击popup对象外的区域,popup对象将自动消失。

ShowPopup ( GObject popup, GObject target ) : void

Show a popup object along with the specific target object. 显示一个popup。将popup显示在指定对象的上边或者下边。 popup的特点是点击popup对象外的区域,popup对象将自动消失。

ShowPopup ( GObject popup, GObject target, object downward ) : void

Show a popup object along with the specific target object. 显示一个popup。将popup显示在指定对象的上边或者下边。 popup的特点是点击popup对象外的区域,popup对象将自动消失。

ShowTooltips ( string msg ) : void

ShowTooltipsWin ( GObject tooltipWin ) : void

ShowWindow ( Window win ) : void

Display a window.

TogglePopup ( GObject popup ) : void

If a popup is showing, then close it; otherwise, open it.

TogglePopup ( GObject popup, GObject target ) : void

TogglePopup ( GObject popup, GObject target, object downward ) : void

Private Methods

Method Description
AdjustModalLayer ( ) : void
CheckPopups ( ) : void
ClosePopup ( GObject target ) : void
__showTooltipsWin ( object param ) : void
__stageTouchBegin ( EventContext context ) : void

Method Details

ApplyContentScaleFactor() public method

This is called after screen size changed.
public ApplyContentScaleFactor ( ) : void
return void

BringToFront() public method

将一个窗口提到所有窗口的最前面
public BringToFront ( Window win ) : void
win Window
return void

CloseAllExceptModals() public method

Close all windows except modal windows.
public CloseAllExceptModals ( ) : void
return void

CloseAllWindows() public method

Close all windows.
public CloseAllWindows ( ) : void
return void

CloseModalWait() public method

Hide modal layer and waiting sign.
public CloseModalWait ( ) : void
return void

DisableSound() public method

public DisableSound ( ) : void
return void

DisplayObjectToGObject() public method

public DisplayObjectToGObject ( DisplayObject obj ) : GObject
obj DisplayObject
return GObject

EnableSound() public method

public EnableSound ( ) : void
return void

GRoot() public method

public GRoot ( ) : System.Collections.Generic
return System.Collections.Generic

GetPoupPosition() public method

public GetPoupPosition ( GObject popup, GObject target, object downward ) : Vector2
popup GObject
target GObject
downward object
return UnityEngine.Vector2

GetTopWindow() public method

Get window on top.
public GetTopWindow ( ) : Window
return Window

HidePopup() public method

Close all popups.
public HidePopup ( ) : void
return void

HidePopup() public method

Close a popup.
public HidePopup ( GObject popup ) : void
popup GObject
return void

HideTooltips() public method

public HideTooltips ( ) : void
return void

HideWindow() public method

Call window.Hide 关闭一个窗口。将调用Window.Hide方法。
public HideWindow ( Window win ) : void
win Window
return void

HideWindowImmediately() public method

Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。
public HideWindowImmediately ( Window win ) : void
win Window
return void

HideWindowImmediately() public method

Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。
public HideWindowImmediately ( Window win, bool dispose ) : void
win Window
dispose bool True to dispose the window.
return void

PlayOneShotSound() public method

public PlayOneShotSound ( AudioClip clip ) : void
clip UnityEngine.AudioClip
return void

PlayOneShotSound() public method

public PlayOneShotSound ( AudioClip clip, float volumeScale ) : void
clip UnityEngine.AudioClip
volumeScale float
return void

SetContentScaleFactor() public method

Set content scale factor.
public SetContentScaleFactor ( int designResolutionX, int designResolutionY ) : void
designResolutionX int Design resolution of x axis.
designResolutionY int Design resolution of y axis.
return void

SetContentScaleFactor() public method

Set content scale factor.
public SetContentScaleFactor ( int designResolutionX, int designResolutionY, UIContentScaler screenMatchMode ) : void
designResolutionX int Design resolution of x axis.
designResolutionY int Design resolution of y axis.
screenMatchMode UIContentScaler Math mode.
return void

ShowModalWait() public method

Display a modal layer and a waiting sign in the front. 显示一个半透明层和一个等待标志在最前面。半透明层的颜色可以通过UIConfig.modalLayerColor设定。 等待标志的资源可以通过UIConfig.globalModalWaiting。等待标志组件会设置为屏幕大小,请内部做好关联。
public ShowModalWait ( ) : void
return void

ShowPopup() public method

Show a popup object. 显示一个popup。 popup的特点是点击popup对象外的区域,popup对象将自动消失。
public ShowPopup ( GObject popup ) : void
popup GObject
return void

ShowPopup() public method

Show a popup object along with the specific target object. 显示一个popup。将popup显示在指定对象的上边或者下边。 popup的特点是点击popup对象外的区域,popup对象将自动消失。
public ShowPopup ( GObject popup, GObject target ) : void
popup GObject
target GObject
return void

ShowPopup() public method

Show a popup object along with the specific target object. 显示一个popup。将popup显示在指定对象的上边或者下边。 popup的特点是点击popup对象外的区域,popup对象将自动消失。
public ShowPopup ( GObject popup, GObject target, object downward ) : void
popup GObject
target GObject
downward object True to display downwards, false to display upwards, null to display automatically.
return void

ShowTooltips() public method

public ShowTooltips ( string msg ) : void
msg string
return void

ShowTooltipsWin() public method

public ShowTooltipsWin ( GObject tooltipWin ) : void
tooltipWin GObject
return void

ShowWindow() public method

Display a window.
public ShowWindow ( Window win ) : void
win Window
return void

TogglePopup() public method

If a popup is showing, then close it; otherwise, open it.
public TogglePopup ( GObject popup ) : void
popup GObject
return void

TogglePopup() public method

public TogglePopup ( GObject popup, GObject target ) : void
popup GObject
target GObject
return void

TogglePopup() public method

public TogglePopup ( GObject popup, GObject target, object downward ) : void
popup GObject
target GObject
downward object
return void