using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; using Nuclex.Graphics; namespace Nuclex.Fonts.Demo.ShowOff { /// Component for showing off the capabilities of Nuclex.Fonts public class FontShowOffComponent : DrawableGameComponent { /// Initializes a new font showoff component /// Game providing containing the graphics device to use public FontShowOffComponent(Microsoft.Xna.Framework.Game game) : base(game) { this.contentManager = new ContentManager(game.Services); } /// /// Allows the game component to perform any initialization it needs to before starting /// to run. This is where it can query for any required services and load content. /// public override void Initialize() { base.Initialize(); } /// Allows the game component to update itself. /// Provides a snapshot of timing values. public override void Update(GameTime gameTime) { // TODO: Add your update code here // Plan: // // Screen #1 // // Nuclex.Fonts is a component from the Nuclex Framework. // // Its content importer can act as a replacement for // the XNA font importer. Compare these fonts, both // rendered using the XNA SpriteFont class: // // __baseline______________________Nuclex Importer____ // XNA Importer // // // // Screen #2 // // But the real strength of Nuclex.Fonts is something else: // Vector-based font rendering. // // For some effects, bitmap fonts just don't cut it: // // Rotating SpriteFont Rotating VectorFont // // // // Zooming SpriteFont Zooming VectorFont // // // // Particles generated on Text surface base.Update(gameTime); } /* /// /// Called when the object needs to set up graphics resources. Override to /// set up any object specific graphics resources. /// /// /// True if all graphics resources need to be set up; false if only /// manual resources need to be set up. /// protected override void LoadGraphicsContent(bool loadAllContent) { base.LoadGraphicsContent(loadAllContent); } /// /// Called when graphics resources should be released. Override to /// handle component specific graphics resources. /// /// /// True if all graphics resources should be released; false if only /// manual resources should be released. /// protected override void UnloadGraphicsContent(bool unloadAllContent) { base.UnloadGraphicsContent(unloadAllContent); } */ /// Loads and manages the component's assets private ContentManager contentManager; } } // namespace Nuclex.Fonts.Demo.ShowOff