FairyGUI.GRoot
class FairyGUI.GRoot
Fields and Properties:
- (static)
float FairyGUI.GRoot.contentScaleFactor
- Description:
- (static)
int FairyGUI.GRoot.contentScaleLevel
- Description:
- (static)
FairyGUI.GRoot FairyGUI.GRoot.inst
FairyGUI.GGraph modalLayer
- Description:
bool hasModalWindow
- Description: Return true if a modal window is on stage.
bool modalWaiting
- Description: Return true if modal waiting layer is on stage.
FairyGUI.GObject touchTarget
- Description: Get current touch target. (including hover)
bool hasAnyPopup
- Description:
FairyGUI.GObject focus
- Description:
float soundVolume
- Description:
Constructors:
FairyGUI.GRoot.New()
Methods:
void Dispose()
void SetContentScaleFactor(int, int)
- Description: Set content scale factor.
- Parameter designResolutionX: Design resolution of x axis.
- Parameter designResolutionY: Design resolution of y axis.
void SetContentScaleFactor(int, int, FairyGUI.UIContentScaler.ScreenMatchMode)
- Description: Set content scale factor.
- Parameter designResolutionX: Design resolution of x axis.
- Parameter designResolutionY: Design resolution of y axis.
- Parameter screenMatchMode: Match mode.
void SetContentScaleFactor(float)
- Description:
- Parameter constantScaleFactor:
void ApplyContentScaleFactor()
- Description: This is called after screen size changed.
void ShowWindow(FairyGUI.Window)
- Description: Display a window.
- Parameter win:
void HideWindow(FairyGUI.Window)
- Description: Close a window by calling the
window.Hide
method - Parameter win:
- Description: Close a window by calling the
void HideWindowImmediately(FairyGUI.Window)
- Description: Remove a window from stage immediately. window.Hide/window.OnHide will never be called.
- Parameter win:
void HideWindowImmediately(FairyGUI.Window, bool)
- Description: Remove a window from stage immediately. window.Hide/window.OnHide will never be called.
- Parameter win:
- Parameter dispose: True to dispose the window.
void BringToFront(FairyGUI.Window)
- Description: Bring a window in front of all other windows.
- Parameter win:
void ShowModalWait()
- Description: Display a modal layer with a waiting sign in the foreground. The modal layer color can be set using
UIConfig.modalLayerColor
, and the waiting indicator resource can be set usingUIConfig.globalModalWaiting
. The waiting indicator component is set to the screen size, so please ensure proper internal linking.
- Description: Display a modal layer with a waiting sign in the foreground. The modal layer color can be set using
void CloseModalWait()
- Description: Hide modal layer and waiting sign.
void CloseAllExceptModals()
- Description: Close all windows except modal windows.
void CloseAllWindows()
- Description: Close all windows.
FairyGUI.Window GetTopWindow()
- Description: Get window on top.
- Return:
FairyGUI.GObject DisplayObjectToGObject(FairyGUI.DisplayObject)
- Description:
- Parameter obj:
- Return:
void ShowPopup(FairyGUI.GObject)
- Description: Display a popup object. The popup automatically disappears when clicking outside the popup area.
- Parameter popup:
void ShowPopup(FairyGUI.GObject, FairyGUI.GObject)
- Description: Show a popup object along with the specific target object. The popup automatically disappears when clicking outside the popup area.
- Parameter popup:
- Parameter target:
void ShowPopup(FairyGUI.GObject, FairyGUI.GObject, object)
void ShowPopup(FairyGUI.GObject, FairyGUI.GObject, FairyGUI.PopupDirection)
- Description: Show a popup object along with the specific target object. The popup automatically disappears when clicking outside the popup area.
- Parameter popup:
- Parameter target:
- Parameter dir:
void ShowPopup(FairyGUI.GObject, FairyGUI.GObject, FairyGUI.PopupDirection, bool)
- Description: Display a popup object near a specified target object. The popup can be shown above or below the target object. By default, the popup closes on touchEnd events, but setting
closeUntilUpEvent
to true allows the popup to close on touchUp events instead. - Parameter popup:
- Parameter target:
- Parameter dir:
- Parameter closeUntilUpEvent:
- Description: Display a popup object near a specified target object. The popup can be shown above or below the target object. By default, the popup closes on touchEnd events, but setting
UnityEngine.Vector2 GetPoupPosition(FairyGUI.GObject, FairyGUI.GObject, object)
UnityEngine.Vector2 GetPoupPosition(FairyGUI.GObject, FairyGUI.GObject, FairyGUI.PopupDirection)
- Description:
- Parameter popup:
- Parameter target:
- Parameter dir:
- Return:
void TogglePopup(FairyGUI.GObject)
- Description: If a popup is showing, then close it; otherwise, open it.
- Parameter popup:
void TogglePopup(FairyGUI.GObject, FairyGUI.GObject)
- Description:
- Parameter popup:
- Parameter target:
void TogglePopup(FairyGUI.GObject, FairyGUI.GObject, object)
void TogglePopup(FairyGUI.GObject, FairyGUI.GObject, FairyGUI.PopupDirection)
- Description:
- Parameter popup:
- Parameter target:
- Parameter dir:
void TogglePopup(FairyGUI.GObject, FairyGUI.GObject, FairyGUI.PopupDirection, bool)
- Description:
- Parameter popup:
- Parameter target:
- Parameter dir:
- Parameter closeUntilUpEvent:
void HidePopup()
- Description: Close all popups.
void HidePopup(FairyGUI.GObject)
- Description: Close a popup.
- Parameter popup:
void ShowTooltips(string)
- Description:
- Parameter msg:
void ShowTooltips(string, float)
- Description:
- Parameter msg:
- Parameter delay:
void ShowTooltipsWin(FairyGUI.GObject)
- Description:
- Parameter tooltipWin:
void ShowTooltipsWin(FairyGUI.GObject, float)
- Description:
- Parameter tooltipWin:
- Parameter delay:
void HideTooltips()
- Description:
void EnableSound()
- Description:
void DisableSound()
- Description:
void PlayOneShotSound(UnityEngine.AudioClip, float)
- Description:
- Parameter clip:
- Parameter volumeScale:
void PlayOneShotSound(UnityEngine.AudioClip)
- Description:
- Parameter clip: