/// <summary>
		/// Addes the given <see cref="FontSetGroup"/>s to the resolver.
		/// </summary>
		/// <remarks>
		/// When resolving a font, the groups are examined in the reverse order in which they were added.
		/// </remarks>
		/// <param name="p_fsgFontSets">The font set group to add.</param>
		public void AddFontSets(FontSetGroup p_fsgFontSets)
		{
			m_lstFontSetGroups.Add(p_fsgFontSets);
		}
Пример #2
0
		/// <summary>
		/// A simple constructor that initializes the theme.
		/// </summary>
		/// <param name="p_icnIcon">The icon to use for this theme.</param>
		/// <param name="p_clrPrimary">The theme's primary colour.</param>
		/// <param name="p_fsgFontSets">The theme's font sets.</param>
		public Theme(Icon p_icnIcon, Color p_clrPrimary, FontSetGroup p_fsgFontSets)
		{
			Icon = p_icnIcon;
			PrimaryColour = p_clrPrimary;
			FontSets = p_fsgFontSets ?? new FontSetGroup();
		}
Пример #3
0
		/// <summary>
		/// Sets up the fonts.
		/// </summary>
		/// <returns>The <see cref="NexusFontSetResolver"/> to be used.</returns>
		private NexusFontSetResolver SetUpFonts()
		{
			FontManager.Add("LinBiolinum", Resources.LinBiolinum_RB);
			FontManager.Add("LinBiolinum", Resources.LinBiolinum_RI);

			FontSet fstDefault = new FontSet(new string[] { "Microsoft Sans Serif", "Arial" });
			FontSetGroup fsgDefault = new FontSetGroup(fstDefault);
			fsgDefault.AddFontSet("StandardText", fstDefault);
			fsgDefault.AddFontSet("HeadingText", fstDefault);
			fsgDefault.AddFontSet("SmallText", new FontSet(new string[] { "Segoe UI", "Arial" }));
			fsgDefault.AddFontSet("MenuText", new FontSet(new string[] { "Segoe UI", "Arial" }));
			fsgDefault.AddFontSet("GameSearchText", new FontSet(new string[] { "LinBiolinum" }));
			fsgDefault.AddFontSet("TestText", new FontSet(new string[] { "Wingdings" }));

			NexusFontSetResolver fsrResolver = new NexusFontSetResolver();
			fsrResolver.AddFontSets(fsgDefault);

			FontProvider.SetFontSetResolver(fsrResolver);
			return fsrResolver;
		}