Exemplo n.º 1
0
        static void CreateUI()
        {
            uiroot = new RenderForm("Root");
            if (Application.platform == RuntimePlatform.Android | Application.platform == RuntimePlatform.IPhonePlayer)
            {
                uiroot.inputType = UserAction.InputType.OnlyTouch;
            }
            else
            {
                uiroot.inputType = UserAction.InputType.Blend;
            }
            uiroot.SetCanvas(UIRoot);
            root        = uiroot.model;
            UIPage.Root = uiroot.AddNode("page");
            UIPage.Root.data.sizeDelta = new Vector2(Screen.width, Screen.height);
            UIMenu.Root = uiroot.AddNode("menu");
            UIMenu.Root.data.sizeDelta = new Vector2(Screen.width, Screen.height);
            UINotify.Root = uiroot.AddNode("notify");
            UINotify.Root.data.sizeDelta = new Vector2(Screen.width, Screen.height);

            var buff = new GameObject("buffer", typeof(RectTransform));

            buff.transform.SetParent(UIRoot);
            buff.SetActive(false);
            ModelManagerUI.CycleBuffer = buff.transform;
        }