void EnsureZIndex()
        {
            if (ElementController.LogicalChildren.Count == 0)
            {
                return;
            }

            for (var z = 0; z < ElementController.LogicalChildren.Count; z++)
            {
                var child = ElementController.LogicalChildren[z] as VisualElement;
                if (child == null)
                {
                    continue;
                }

                IVisualElementRenderer childRenderer = Platform.GetRenderer(child);

                if (childRenderer == null)
                {
                    continue;
                }

                if (CanvasExtensions.GetZIndex(childRenderer.GetNativeElement()) != (z + 1))
                {
                    if (!_isZChanged)
                    {
                        _isZChanged = true;
                    }

                    CanvasExtensions.SetZIndex(childRenderer.GetNativeElement(), z + 1);
                }
            }
        }
    public GameObject CantConnectPopup(string message, string error)
    {
        GameObject cantConnectPopupInstance = Instantiate(cantConnectPopup, Vector3.zero, Quaternion.identity);

        CanvasExtensions.Add(cantConnectPopupInstance);
        cantConnectPopupInstance.GetComponent <CantConnectPopup>().Show(message, error);

        return(cantConnectPopup);
    }
Exemple #3
0
    private ResultPopup MakePopup(PlayerGame game_)
    {
        GameObject  resultPopupGameObj = Instantiate(gameObject);
        ResultPopup resultPopup        = resultPopupGameObj.GetComponent <ResultPopup>();

        resultPopup.game = game_;

        CanvasExtensions.Add(resultPopupGameObj);
        //resultPopupGameObj.GetComponent<RectTransform>().SetParent();

        return(resultPopup);
    }