Class GlobalUIManager
Inheritance
object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
GlobalUIManager
Assembly: Dew.Core.dll
Syntax
public class GlobalUIManager : ManagerBase<GlobalUIManager>, ILogicUpdate
Fields
Declaration
[NonSerialized]
public IMenuView currentMenuView
Field Value
devFloatingTextParent
Declaration
public RectTransform devFloatingTextParent
Field Value
| Type |
Description |
| UnityEngine.RectTransform |
|
devFloatingTextPrefab
Declaration
public TextMeshProUGUI devFloatingTextPrefab
Field Value
| Type |
Description |
| TMPro.TextMeshProUGUI |
|
focusDisplayAnimationTarget
Declaration
public Transform focusDisplayAnimationTarget
Field Value
| Type |
Description |
| UnityEngine.Transform |
|
focusDisplayBoxObject
Declaration
public GameObject focusDisplayBoxObject
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
focusDisplayCircleObject
Declaration
public GameObject focusDisplayCircleObject
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
focusDisplayObject
Declaration
public GameObject focusDisplayObject
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
Declaration
public RectTransform focusDisplayTransform
Field Value
| Type |
Description |
| UnityEngine.RectTransform |
|
fontBody
Declaration
public TMP_FontAsset fontBody
Field Value
| Type |
Description |
| TMPro.TMP_FontAsset |
|
fontHeading
Declaration
public TMP_FontAsset fontHeading
Field Value
| Type |
Description |
| TMPro.TMP_FontAsset |
|
fontHeadingBold
Declaration
public TMP_FontAsset fontHeadingBold
Field Value
| Type |
Description |
| TMPro.TMP_FontAsset |
|
fontHeadingLight
Declaration
public TMP_FontAsset fontHeadingLight
Field Value
| Type |
Description |
| TMPro.TMP_FontAsset |
|
fxHighlightHide
Declaration
public GameObject fxHighlightHide
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
fxHighlightShow
Declaration
public GameObject fxHighlightShow
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
fxTick
Declaration
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
isBackDisabled
Declaration
[NonSerialized]
public bool isBackDisabled
Field Value
onFocusedChanged
Declaration
public Action<IGamepadFocusable, IGamepadFocusable> onFocusedChanged
Field Value
Declaration
public CanvasGroup tooltipBoxCanvasGroup
Field Value
| Type |
Description |
| UnityEngine.CanvasGroup |
|
Declaration
public RectTransform tooltipBoxTransform
Field Value
| Type |
Description |
| UnityEngine.RectTransform |
|
tutHighlightBackdropBottom
Declaration
public RectTransform tutHighlightBackdropBottom
Field Value
| Type |
Description |
| UnityEngine.RectTransform |
|
tutHighlightBackdropLeft
Declaration
public RectTransform tutHighlightBackdropLeft
Field Value
| Type |
Description |
| UnityEngine.RectTransform |
|
tutHighlightBackdropRight
Declaration
public RectTransform tutHighlightBackdropRight
Field Value
| Type |
Description |
| UnityEngine.RectTransform |
|
tutHighlightBackdropTop
Declaration
public RectTransform tutHighlightBackdropTop
Field Value
| Type |
Description |
| UnityEngine.RectTransform |
|
tutHighlightBox
Declaration
public RectTransform tutHighlightBox
Field Value
| Type |
Description |
| UnityEngine.RectTransform |
|
tutHighlightObject
Declaration
public GameObject tutHighlightObject
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
tutHighlightText
Declaration
public TextMeshProUGUI tutHighlightText
Field Value
| Type |
Description |
| TMPro.TextMeshProUGUI |
|
Properties
focused
Declaration
public IGamepadFocusable focused { get; }
Property Value
Declaration
public bool isTooltipShown { get; }
Property Value
isTutorialHighlighting
Declaration
public bool isTutorialHighlighting { get; }
Property Value
lastFocusChangeUnscaledTime
Declaration
public float lastFocusChangeUnscaledTime { get; }
Property Value
Declaration
public Rect tooltipScreenSpaceRect { get; }
Property Value
| Type |
Description |
| UnityEngine.Rect |
|
Methods
AddBackHandler(MonoBehaviour, int, Func<bool>)
Add handler for back buttons.
Handler must return boolean value as indication of whether the back button event is consumed or not.
Callback with highest priority will fire first when back button is pressed.
If priority is the same, last added item will be fired first.
If owner is destroyed, back handler will automatically be unregistered.
Declaration
public BackHandler AddBackHandler(MonoBehaviour owner, int priority, Func<bool> callback)
Parameters
| Type |
Name |
Description |
| UnityEngine.MonoBehaviour |
owner |
|
| int |
priority |
|
| System.Func<TResult><bool> |
callback |
|
Returns
AddGamepadFocusable(IGamepadFocusable)
Declaration
public void AddGamepadFocusable(IGamepadFocusable focusable)
Parameters
ClickHighlightForTutorial()
Declaration
public void ClickHighlightForTutorial()
EnforceFontFallbackOrder()
Declaration
public void EnforceFontFallbackOrder()
FrameUpdate()
Declaration
public override void FrameUpdate()
Overrides
GetFocusedComponent<T>()
Declaration
public T GetFocusedComponent<T>() where T : Component
Returns
Type Parameters
GetIntersectingRects(List<Rect>, Vector2, Vector2, float, float)
Declaration
public static List<GlobalUIManager.RectResult> GetIntersectingRects(List<Rect> rects, Vector2 origin, Vector2 direction, float angle, float radius)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<T><UnityEngine.Rect> |
rects |
|
| UnityEngine.Vector2 |
origin |
|
| UnityEngine.Vector2 |
direction |
|
| float |
angle |
|
| float |
radius |
|
Returns
GoBack()
Handle go back event with registered handlers.
Declaration
HighlightForTutorial(TutorialHighlightSettings)
Declaration
public IEnumerator HighlightForTutorial(TutorialHighlightSettings s)
Parameters
| Type |
Name |
Description |
| TutorialHighlightSettings |
s |
|
Returns
| Type |
Description |
| System.Collections.IEnumerator |
|
This checks for occlusions.
Declaration
public bool IsUIElementClickable(RectTransform rectTransform)
Parameters
| Type |
Name |
Description |
| UnityEngine.RectTransform |
rectTransform |
|
Returns
LogicUpdate(float)
Declaration
public override void LogicUpdate(float dt)
Parameters
| Type |
Name |
Description |
| float |
dt |
|
Overrides
MoveFocus(Vector3, float, float, float, Func<IGamepadFocusable, bool>, Func<IGamepadFocusable, float>)
Declaration
public bool MoveFocus(Vector3 direction, float angleLimit, float normalizedPerpendicularDistLimit, float normalizedDistLimit, Func<IGamepadFocusable, bool> condition = null, Func<IGamepadFocusable, float> customScoreFunc = null)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3 |
direction |
|
| float |
angleLimit |
|
| float |
normalizedPerpendicularDistLimit |
|
| float |
normalizedDistLimit |
|
| System.Func<T, TResult><IGamepadFocusable, bool> |
condition |
|
| System.Func<T, TResult><IGamepadFocusable, float> |
customScoreFunc |
|
Returns
MoveFocus(Vector3, Vector2, Vector2, Vector2, Func<IGamepadFocusable, bool>, Func<IGamepadFocusable, float>)
Declaration
public bool MoveFocus(Vector3 direction, Vector2 angleLimit, Vector2 normalizedPerpendicularDistLimit, Vector2 normalizedDistLimit, Func<IGamepadFocusable, bool> condition = null, Func<IGamepadFocusable, float> customScoreFunc = null)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3 |
direction |
|
| UnityEngine.Vector2 |
angleLimit |
|
| UnityEngine.Vector2 |
normalizedPerpendicularDistLimit |
|
| UnityEngine.Vector2 |
normalizedDistLimit |
|
| System.Func<T, TResult><IGamepadFocusable, bool> |
condition |
|
| System.Func<T, TResult><IGamepadFocusable, float> |
customScoreFunc |
|
Returns
MoveFocus(Vector3)
Declaration
public bool MoveFocus(Vector3 direction)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3 |
direction |
|
Returns
PopulateCacheData(ref GetFocusTargetSettings, out Action)
Populate cache data for the given settings to make consecutive GetTarget calls faster.
Declaration
public void PopulateCacheData(ref GetFocusTargetSettings settings, out Action handle)
Parameters
RemoveBackHandler(BackHandler)
Remove the provided back handler if it exists in current handler list.
If owner is destroyed, back handler will automatically be unregistered.
Declaration
public void RemoveBackHandler(BackHandler handle)
Parameters
RemoveGamepadFocusable(IGamepadFocusable)
Declaration
public void RemoveGamepadFocusable(IGamepadFocusable focusable)
Parameters
SetFocus(IGamepadFocusable)
Declaration
public void SetFocus(IGamepadFocusable focusable)
Parameters
SetFocusOnComponent(Component)
Declaration
public void SetFocusOnComponent(Component focusable)
Parameters
| Type |
Name |
Description |
| UnityEngine.Component |
focusable |
|
SetFocusOnFirstFocusable(GameObject)
Declaration
public void SetFocusOnFirstFocusable(GameObject parent)
Parameters
| Type |
Name |
Description |
| UnityEngine.GameObject |
parent |
|
ShowDevText(string, bool)
Show developer-only floating text in top-left corner of the screen for some time.
This is not shown to non-developers.
Declaration
public void ShowDevText(string rawText, bool log = true)
Parameters
| Type |
Name |
Description |
| string |
rawText |
|
| bool |
log |
|
SimulateClickOnUIElement(Component)
Declaration
public void SimulateClickOnUIElement(Component comp)
Parameters
| Type |
Name |
Description |
| UnityEngine.Component |
comp |
|
TryGetFocusTarget(GetFocusTargetSettings, out IGamepadFocusable)
Declaration
public bool TryGetFocusTarget(GetFocusTargetSettings s, out IGamepadFocusable next)
Parameters
Returns
TryGetFocusTargetGeneric(Vector3, Func<IGamepadFocusable, bool>, out IGamepadFocusable)
Declaration
public bool TryGetFocusTargetGeneric(Vector3 direction, Func<IGamepadFocusable, bool> condition, out IGamepadFocusable next)
Parameters
Returns
TryMoveFocusBack()
Declaration
public bool TryMoveFocusBack()
Returns
UnhighlightForTutorial()
Declaration
public void UnhighlightForTutorial()
Implements
Extension Methods