示例#1
0
 public UIManager(Game game, SpriteBatch spriteBatch, ImGuiRenderer gui, RenderTargetDescriber renderTargetDescriber, SceneSelector sceneSelector, EntityController entityController, CameraController cameraController, Editors editors, IList <IMenu> menus, EntityWindow entityWindow, NetWindow netWindow, KeyboardInput keyboardInput, MouseInput mouseInput)
 {
     this.Gui                   = gui;
     this.KeyboardInput         = keyboardInput;
     this.MouseInput            = mouseInput;
     this.GameLoop              = game;
     this.SpriteBatch           = spriteBatch;
     this.CameraController      = cameraController;
     this.RenderTargetDescriber = renderTargetDescriber;
     this.SceneSelector         = sceneSelector;
     this.EntityController      = entityController;
     this.Menus                 = menus;
     this.EntityWindow          = entityWindow;
     this.NetWindow             = netWindow;
     this.Editors               = editors;
 }
示例#2
0
 public RenderingMenu(Editors editors, DeferredRenderPipeline renderPipeline)
 {
     this.Editors        = editors;
     this.RenderPipeline = renderPipeline;
 }
示例#3
0
        public UIManager(Game game, SpriteBatch spriteBatch, ImGuiRenderer gui, RenderTargetDescriber renderTargetDescriber, SceneSelector sceneSelector, CameraController cameraController, Editors editors, IList <IMenu> menus, EntityWindow entityWindow, KeyboardInput keyboardInput, MouseInput mouseInput)
        {
            this.Gui                   = gui;
            this.KeyboardInput         = keyboardInput;
            this.MouseInput            = mouseInput;
            this.GameLoop              = game;
            this.SpriteBatch           = spriteBatch;
            this.CameraController      = cameraController;
            this.RenderTargetDescriber = renderTargetDescriber;

            this.Menus        = menus;
            this.EntityWindow = entityWindow;
            this.Editors      = editors;

            this.State = UIState.Deserialize();

            if (!string.IsNullOrEmpty(this.State.EditorState.Scene))
            {
                var scene = sceneSelector.Scenes.FirstOrDefault(s => s.Name.Equals(this.State.EditorState.Scene, System.StringComparison.OrdinalIgnoreCase));
                if (scene != null && sceneSelector.CurrentScene != scene)
                {
                    sceneSelector.SwitchScenes(scene);
                }
            }

            if (sceneSelector.CurrentScene == null)
            {
                sceneSelector.SwitchScenes(sceneSelector.Scenes.First());
            }

            this.setCamera = true;

            for (var i = 0; i < this.Menus.Count; i++)
            {
                this.Menus[i].State = this.State;
            }
            this.EntityWindow.State = this.State;
        }