private Texture2D GetAtlasedTexture()
{
Texture2D texture = null;
if (ToolsUtilities.FileManager.IsRelative(AtlasedTextureName))
{
AtlasedTextureName = ToolsUtilities.FileManager.RelativeDirectory + AtlasedTextureName;
AtlasedTextureName = ToolsUtilities.FileManager.RemoveDotDotSlash(AtlasedTextureName);
}
// see if an atlas exists:
var atlasedTexture =
global::RenderingLibrary.Content.LoaderManager.Self.TryLoadContent<AtlasedTexture>(AtlasedTextureName);
if (atlasedTexture != null)
{
mSourceRect = new Rectangle(atlasedTexture.SourceRectangle.Left + 1,
atlasedTexture.SourceRectangle.Top + 1, 1, 1);
texture = atlasedTexture.Texture;
}
return texture;
}