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>(); }
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>(); }
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; }
public static void RegisterTextEx(MenuCommand menuCommand) { GameObject text = CreateTextEx(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(text, menuCommand); }
public static void RegisterChatBubble(MenuCommand menuCommand) { GameObject bubble = CreateBubble(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(bubble, menuCommand); }
public static void RegisterGridView(MenuCommand menuCommand) { GameObject gridViewObj = CreateGridView(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(gridViewObj, menuCommand); }
public static void RegisterSwitch(MenuCommand menuCommand) { GameObject toggleOffObj = CreateSwitch(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(toggleOffObj, menuCommand); }
public static void RegisterVerticalTabView(MenuCommand menuCommand) { GameObject tabViewObj = CreateVerticalTabView(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(tabViewObj, menuCommand); }
public static void RegisterRawImageEx(MenuCommand menuCommand) { GameObject rawImage = CreateRawImageEx(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(rawImage, menuCommand); }
public static void RegisterHeadHud(MenuCommand menuCommand) { GameObject headHud = CreateHeadHud(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(headHud, menuCommand); }
public static void RegisterArcView(MenuCommand menuCommand) { GameObject arcView = CreateArcView(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(arcView, menuCommand); }
public static void RegisterVerticalScrollView(MenuCommand menuCommand) { GameObject scroll = CreateVerticalScrollView(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(scroll, menuCommand); }
public static void RegisterCharacterPanel(MenuCommand menuCommand) { GameObject characterPanel = CreateCharacterPanel(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(characterPanel, menuCommand); }
public static void RegisterImageNumbers(MenuCommand menuCommand) { GameObject imageNumbers = CreateImageNumbers(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(imageNumbers, menuCommand); }
public static void RegisterRadarChart(MenuCommand menuCommand) { GameObject radarChart = CreateRadarChart(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(radarChart, menuCommand); }
public static void RegisterButtonEx(MenuCommand menuCommand) { GameObject button = CreateButtonEx(UIMenuTools.GetStandardResources()); UIMenuTools.PlaceUIElementRoot(button, menuCommand); }