added rotation property to image ui module
This commit is contained in:
parent
3347316182
commit
a402df1475
@ -11,6 +11,7 @@ namespace RhythmBullet.Utilities.UI.Modular.Modules
|
|||||||
{
|
{
|
||||||
class Image : UIModule
|
class Image : UIModule
|
||||||
{
|
{
|
||||||
|
public float rotation = 0f;
|
||||||
public Texture2D Texture { get; set; }
|
public Texture2D Texture { get; set; }
|
||||||
public float ScaleX
|
public float ScaleX
|
||||||
{
|
{
|
||||||
@ -55,7 +56,7 @@ namespace RhythmBullet.Utilities.UI.Modular.Modules
|
|||||||
|
|
||||||
public override void Draw(SpriteBatch batch)
|
public override void Draw(SpriteBatch batch)
|
||||||
{
|
{
|
||||||
batch.Draw(Texture, bounds, color);
|
batch.Draw(Texture, bounds, null, color, rotation, origin, SpriteEffects.None, 0f);
|
||||||
base.Draw(batch);
|
base.Draw(batch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user