示例#1
0
        /// <summary>
        /// 初始化GUI系统,在InitModules时调用
        /// </summary>
        private void InitGuiSystem()
        {
            NRenderResourceManager renderResMgr = NEngine.Instance().RenderResManager;

            guiCanvas = renderResMgr.NewUICanvas();

            // 创建UI系统
            new GUISystem(guiCanvas);

            //加载程序集,注册内置窗口类型
            Assembly executingAssembly = Assembly.GetExecutingAssembly();

            WindowManager.Instance.LoadAssembly(Path.GetDirectoryName(executingAssembly.Location) + System.IO.Path.DirectorySeparatorChar + @"Nexus.GUI.dll");
            // 加载当前执行文件中窗口类型
            WindowManager.Instance.AttachAssembly(executingAssembly);
            WindowManager.Instance.AttachAssembly(Assembly.GetEntryAssembly());
            // 创建一个缺省的唯一父窗口
            GUISystem.Instance.RootWindow = WindowManager.Instance.CreateWindow("Nexus.GUI.Widgets.GUISheet", GUISystem.DefaultRootWindowName, null);
        }
示例#2
0
        public NGUIWidgetsRender()
        {
            NRenderResourceManager renderResMgr = NEngine.Instance().RenderResManager;

            m_uiCanvas = renderResMgr.NewUICanvas();
        }