Beispiel #1
0
        public static void W3DMainMenuInit(WndTopLevelWindow window)
        {
            // We'll show these later via window transitions.
            window.Root.FindChild("MainMenu.wnd:MainMenuRuler").Hide();
            window.Root.FindChild("MainMenu.wnd:MainMenuRuler").Opacity = 0;

            window.Root.FindChild("MainMenu.wnd:MapBorder2").Opacity = 0;
            foreach (var button in window.Root.FindChild("MainMenu.wnd:EarthMap2").Children)
            {
                button.Opacity     = 0;
                button.TextOpacity = 0;
            }

            window.Root.FindChild("MainMenu.wnd:MapBorder").Hide();
            window.Root.FindChild("MainMenu.wnd:MapBorder1").Hide();
            window.Root.FindChild("MainMenu.wnd:MapBorder3").Hide();
            window.Root.FindChild("MainMenu.wnd:MapBorder4").Hide();

            window.Root.FindChild("MainMenu.wnd:ButtonUSARecentSave").Hide();
            window.Root.FindChild("MainMenu.wnd:ButtonUSALoadGame").Hide();

            window.Root.FindChild("MainMenu.wnd:ButtonGLARecentSave").Hide();
            window.Root.FindChild("MainMenu.wnd:ButtonGLALoadGame").Hide();

            window.Root.FindChild("MainMenu.wnd:ButtonChinaRecentSave").Hide();
            window.Root.FindChild("MainMenu.wnd:ButtonChinaLoadGame").Hide();

            _doneMainMenuFadeIn = false;
        }
Beispiel #2
0
        public WndTopLevelWindow PushWindow(WndTopLevelWindow window)
        {
            CreateSizeDependentResources(window, _game.Window.ClientBounds.Size);

            _windowStack.Push(window);

            window.LayoutInit?.Invoke(window, _game);

            return(window);
        }
Beispiel #3
0
        private void CreateSizeDependentResources(WndTopLevelWindow window)
        {
            var viewport = _game.Scene.Camera.Viewport;
            var size     = new Size(viewport.Width, viewport.Height);

            window.Root.DoActionRecursive(
                x =>
            {
                x.CreateSizeDependentResources(_game.ContentManager, size);
                return(true);
            });
        }