示例#1
0
        public void Create(Alert alert)
        {
            UiRoot root = UiManager.Instance.uiRoot;

            root.LoadMenu <AlertRegion>(typeof(AlertMenu));

            if (root.GetMenuRegion(out AlertRegion alertRegion))
            {
                alertRegion.OnLoaded += menu =>
                {
                    (menu as AlertMenu)?.Attach(alert);
                };
            }
        }
示例#2
0
        public void Create(Window window)
        {
            UiRoot root = UiManager.Instance.uiRoot;

            root.LoadMenu <WindowRegion>(typeof(WindowMenu));

            if (root.GetMenuRegion(out WindowRegion windowRegion))
            {
                windowRegion.OnLoaded += menu =>
                {
                    (menu as WindowMenu)?.Attach(window);
                };
            }
        }