Made AnimationEditor compatible with the new Sprite implementation

This commit is contained in:
quinnvoker
2018-12-19 10:18:42 -08:00
parent b8173d688d
commit 0f7f1b1be4
5 changed files with 187 additions and 272 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ namespace AnimationEditor
{
class AnimationPreview : UpdateWindow
{
public Texture2D SpriteSheet { get; set; }
public AnimatedSprite PreviewSprite { get; set; }
public float ZoomLevel { get; set; }
@@ -89,7 +90,7 @@ namespace AnimationEditor
Editor.spriteBatch.Begin(samplerState: SamplerState.PointClamp, transformMatrix: scaleMatrix);
else
Editor.spriteBatch.Begin(transformMatrix: scaleMatrix);
PreviewSprite?.Draw(Editor.spriteBatch, new Vector2((Editor.graphics.PresentationParameters.BackBufferWidth / 2) / ZoomLevel, (Editor.graphics.PresentationParameters.BackBufferHeight / 2) / ZoomLevel), Color.White);
PreviewSprite?.Draw(Editor.spriteBatch, SpriteSheet, new Vector2((Editor.graphics.PresentationParameters.BackBufferWidth / 2) / ZoomLevel, (Editor.graphics.PresentationParameters.BackBufferHeight / 2) / ZoomLevel), Color.White);
Editor.spriteBatch.End();
}
}