Replaced the arrows in server lobby buttons with images, made GUIImages rotatable (todo: make them align correctly when rotated/scaled), fixed the size of the sub save warning messagebox

This commit is contained in:
Regalis
2017-02-27 22:28:10 +02:00
parent 979c82443c
commit 9e16542b13
4 changed files with 34 additions and 14 deletions
+5 -3
View File
@@ -6,9 +6,11 @@ namespace Barotrauma
{
public class GUIImage : GUIComponent
{
Sprite sprite;
public float Rotation;
Rectangle sourceRect;
private Sprite sprite;
private Rectangle sourceRect;
bool crop;
@@ -85,7 +87,7 @@ namespace Barotrauma
if (sprite != null && sprite.Texture != null)
{
spriteBatch.Draw(sprite.Texture, new Vector2(rect.X, rect.Y), sourceRect, currColor * (currColor.A / 255.0f), 0.0f, Vector2.Zero,
spriteBatch.Draw(sprite.Texture, new Vector2(rect.X, rect.Y), sourceRect, currColor * (currColor.A / 255.0f), Rotation, Vector2.Zero,
Scale, SpriteEffects.None, 0.0f);
}