예제 #1
0
        public static void RegisterTVShow(MenuCommand menuCommand)
        {
            GameObject tv = CreateTVShow(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(tv, menuCommand);
            // 以下必须在此执行,若放在CreateTVShow中会因为新建对象层级未绑定以至canvas为null
            TVShow tvShow = tv.GetComponent <TVShow>();

            tvShow.canvas = tv.GetComponentInParent <Canvas>();
        }
예제 #2
0
        public static void RegisterJoyStick(MenuCommand menuCommand)
        {
            GameObject joyStick = CreateJoyStick(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(joyStick, menuCommand);

            // 以下三行必须在此执行,若放在CreateJoyStick中会因为新建对象层级未绑定以至canvas为null
            UIDragable dragable = joyStick.GetComponentInChildren <UIDragable>();
            Canvas     canvas   = dragable.GetComponentInParent <Canvas>();

            dragable.rect = canvas.GetComponent <RectTransform>();
        }
예제 #3
0
        public static void RegisterFlipPage(MenuCommand menuCommand)
        {
            GameObject book = CreateFlipPage(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(book, menuCommand);
            // 以下必须在此执行,若放在CreateFlipPage中会因为新建对象层级未绑定以至canvas为null
            FlipPage flipPage = book.GetComponentInChildren <FlipPage>();
            Canvas   canvas   = book.GetComponentInParent <Canvas>();

            flipPage.canvas = canvas;

            flipPage.bookPanel = book.transform as RectTransform;
        }
예제 #4
0
        static GameObject CreateJoyStick(UIResources resources)
        {
            GameObject stickPanel = DefaultControls.CreateImage(UIDefaultControls.ConvertToDefaultResources(resources));

            stickPanel.name = "StickPanel";

            GameObject stickSlider = CreateImageEx(UIMenuTools.GetStandardResources());

            stickSlider.name = "StickSlider";
            stickSlider.transform.localScale = new Vector3(0.6f, 0.6f, 1);

            JoyStick joyStick = stickSlider.AddComponent <JoyStick>();

            joyStick.dragable = stickSlider.GetComponent <UIDragable>();
            joyStick.panel    = stickPanel.transform as RectTransform;
            joyStick.slider   = stickSlider.transform as RectTransform;

            stickSlider.transform.SetParent(stickPanel.transform);

            return(stickPanel);
        }
예제 #5
0
        public static void RegisterGridView(MenuCommand menuCommand)
        {
            GameObject gridViewObj = CreateGridView(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(gridViewObj, menuCommand);
        }
예제 #6
0
        public static void RegisterSwitch(MenuCommand menuCommand)
        {
            GameObject toggleOffObj = CreateSwitch(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(toggleOffObj, menuCommand);
        }
예제 #7
0
        public static void RegisterVerticalTabView(MenuCommand menuCommand)
        {
            GameObject tabViewObj = CreateVerticalTabView(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(tabViewObj, menuCommand);
        }
예제 #8
0
        public static void RegisterRawImageEx(MenuCommand menuCommand)
        {
            GameObject rawImage = CreateRawImageEx(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(rawImage, menuCommand);
        }
예제 #9
0
        public static void RegisterHeadHud(MenuCommand menuCommand)
        {
            GameObject headHud = CreateHeadHud(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(headHud, menuCommand);
        }
예제 #10
0
        public static void RegisterVerticalScrollView(MenuCommand menuCommand)
        {
            GameObject scroll = CreateVerticalScrollView(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(scroll, menuCommand);
        }
예제 #11
0
        public static void RegisterCharacterPanel(MenuCommand menuCommand)
        {
            GameObject characterPanel = CreateCharacterPanel(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(characterPanel, menuCommand);
        }
예제 #12
0
        public static void RegisterImageNumbers(MenuCommand menuCommand)
        {
            GameObject imageNumbers = CreateImageNumbers(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(imageNumbers, menuCommand);
        }
예제 #13
0
        public static void RegisterRadarChart(MenuCommand menuCommand)
        {
            GameObject radarChart = CreateRadarChart(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(radarChart, menuCommand);
        }
예제 #14
0
        public static void RegisterButtonEx(MenuCommand menuCommand)
        {
            GameObject button = CreateButtonEx(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(button, menuCommand);
        }
예제 #15
0
        public static void RegisterChatBubble(MenuCommand menuCommand)
        {
            GameObject bubble = CreateBubble(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(bubble, menuCommand);
        }
예제 #16
0
        public static void RegisterTextEx(MenuCommand menuCommand)
        {
            GameObject text = CreateTextEx(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(text, menuCommand);
        }
예제 #17
0
        public static void RegisterArcView(MenuCommand menuCommand)
        {
            GameObject arcView = CreateArcView(UIMenuTools.GetStandardResources());

            UIMenuTools.PlaceUIElementRoot(arcView, menuCommand);
        }