コード例 #1
0
        /// <summary>
        ///     Allows the game to perform any initialization it needs to before starting to run.
        ///     This is where it can query for any required services and load any non-graphic
        ///     related content.  Calling base.Initialize will enumerate through any components
        ///     and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            IsMouseVisible = true;

            m_NoesisWrapper = new NoesisWrapper(
                this,
                m_Graphics,
                shouldAutoReloadChangedFiles: true,
                rootXamlRelativePath: "NoesisRoot.xaml",
                themeResourcesRelativePath: "NoesisStyle.xaml",
                dataPath: @"..\..\..\Data");

            base.Initialize();
        }
コード例 #2
0
        private void CreateNoesisGUI()
        {
            var config = new NoesisConfig(
                this.Window,
                this.graphics,
                rootXamlFilePath: "TextBox.xaml",
                themeXamlFilePath: "NoesisStyle.xaml",
                currentTotalGameTime: this.lastUpdateTotalGameTime);

            config.SetupInputFromWindows();
            config.SetupProviderSimpleFolder("Data");

            this.noesisGUIWrapper = new NoesisWrapper(config);
        }
コード例 #3
0
        private void CreateNoesisGUI()
        {
            var rootPath        = Path.Combine(Environment.CurrentDirectory, "Data");
            var providerManager = new NoesisProviderManager(
                new FolderXamlProvider(rootPath),
                new FolderFontProvider(rootPath),
                new FolderTextureProvider(rootPath, this.GraphicsDevice));

            var config = new NoesisConfig(
                this.Window,
                this.graphics,
                providerManager,
                rootXamlFilePath: "Samples/TextBox.xaml",
                themeXamlFilePath: null,
                // uncomment this line to use theme file
                //themeXamlFilePath: "Themes/WindowsStyle.xaml",
                currentTotalGameTime: this.lastUpdateTotalGameTime);

            config.SetupInputFromWindows();

            this.noesisWrapper = new NoesisWrapper(config);
            this.noesisWrapper.View.IsPPAAEnabled = true;
        }