示例#1
0
        /// <summary>
        /// Create and initialize a new game.
        /// </summary>
        public EditorWindow()
        {
            disposer = new DisposeGroup();
            // Initialize window and imgui
            var projectInfo = Assembly.GetExecutingAssembly().GetName();

            view = disposer.Add(new RenderView(new RenderViewSettings()
            {
                X      = 100,
                Y      = 100,
                Width  = 1280,
                Height = 720,
                Title  = $"{projectInfo.Name} {DateTime.Now.Year}.{projectInfo.Version.Major}.{projectInfo.Version.Minor}.r{projectInfo.Version.Revision}",
            }));
            gd    = view.GraphicsDevice;
            cl    = gd.ResourceFactory.CreateCommandList();
            imGui = new ImGuiView(gd, view.Window, gd.MainSwapchain.Framebuffer.OutputDescription, view.Width, view.Height);
            ImGui.GetIO().ConfigWindowsMoveFromTitleBarOnly = true;
        }