Faction Test 100.6.0.0

This commit is contained in:
Markus Isberg
2022-11-25 19:55:45 +02:00
parent c44fb0ad3a
commit 0057f5bfce
130 changed files with 2771 additions and 1509 deletions
@@ -956,16 +956,21 @@ namespace Barotrauma
backgroundSprite = new Sprite("Content/UnstableBackground.png", sourceRectangle: null);
}
if (backgroundSprite != null)
var vignette = GUIStyle.GetComponentStyle("mainmenuvignette")?.GetDefaultSprite();
float vignetteScale = Math.Min(GameMain.GraphicsWidth / vignette.size.X, GameMain.GraphicsHeight / vignette.size.Y);
Rectangle drawArea = new Rectangle(
(int)(vignette.size.X * vignetteScale / 2), 0,
(int)(GameMain.GraphicsWidth - vignette.size.X * vignetteScale / 2), GameMain.GraphicsHeight);
if (backgroundSprite?.Texture != null)
{
GUI.DrawBackgroundSprite(spriteBatch, backgroundSprite, Color.White);
GUI.DrawBackgroundSprite(spriteBatch, backgroundSprite, Color.White, drawArea);
}
var vignette = GUIStyle.GetComponentStyle("mainmenuvignette")?.GetDefaultSprite();
if (vignette != null)
{
vignette.Draw(spriteBatch, Vector2.Zero, Color.White, Vector2.Zero, 0.0f,
new Vector2(Math.Min(GameMain.GraphicsWidth / vignette.size.X, GameMain.GraphicsHeight / vignette.size.Y)));
vignette.Draw(spriteBatch, Vector2.Zero, Color.White, Vector2.Zero, 0.0f, vignetteScale);
}
}