Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
GameFontSystem.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using SiliconStudio.Core;
4 using SiliconStudio.Paradox.Games;
6 
7 namespace SiliconStudio.Paradox.Graphics
8 {
9  /// <summary>
10  /// The game system in charge of calling <see cref="FontSystem"/>.
11  /// </summary>
12  internal class GameFontSystem : GameSystem
13  {
14  public FontSystem FontSystem { get; private set; }
15 
16  public GameFontSystem(IServiceRegistry registry)
17  : base(registry)
18  {
19  Services.AddService(typeof(GameFontSystem), this);
20 
21  Visible = true;
22  }
23 
24  public override void Draw(GameTime gameTime)
25  {
26  base.Draw(gameTime);
27 
28  FontSystem.Draw();
29  }
30 
31  public override void Initialize()
32  {
33  base.Initialize();
34 
35  FontSystem = new FontSystem(GraphicsDevice);
36  }
37 
38  protected override void LoadContent()
39  {
40  base.LoadContent();
41 
42  FontSystem.Load();
43  }
44 
45  protected override void UnloadContent()
46  {
47  base.UnloadContent();
48 
49  FontSystem.Unload();
50  }
51  }
52 }
The system managing the fonts.
Definition: FontSystem.cs:13
A service registry is a IServiceProvider that provides methods to register and unregister services...
SharpDX.DirectWrite.Font Font
Current timing used for variable-step (real time) or fixed-step (game time) games.
Definition: GameTime.cs:31