Location hire

This commit is contained in:
Regalis11
2015-07-26 21:15:41 +03:00
parent 461547d949
commit 4238301ad3
13 changed files with 151 additions and 56 deletions
+15
View File
@@ -29,6 +29,21 @@ namespace Subsurface
return doc;
}
public static SpriteFont TryLoadFont(string file, Microsoft.Xna.Framework.Content.ContentManager contentManager)
{
SpriteFont font = null;
try
{
font = contentManager.Load<SpriteFont>(file);
}
catch
{
DebugConsole.ThrowError("Loading font ''"+file+"'' failed");
}
return font;
}
public static object GetAttributeObject(XElement element, string name)
{
if (element.Attribute(name) == null) return null;