using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
namespace Barotrauma
{
partial class Screen
{
private GUIFrame frame;
public GUIFrame Frame
{
get
{
if (frame == null)
{
frame = new GUIFrame(new RectTransform(GUICanvas.Instance.RelativeSize, GUICanvas.Instance), style: null)
{
CanBeFocused = false
};
}
return frame;
}
}
///
/// By default, creates a new frame for the screen and adds all elements to the gui update list.
///
public virtual void AddToGUIUpdateList()
{
Frame.AddToGUIUpdateList();
}
public virtual void Draw(double deltaTime, GraphicsDevice graphics, SpriteBatch spriteBatch)
{
}
public void ColorFade(Color from, Color to, float duration)
{
if (duration <= 0.0f) return;
CoroutineManager.StartCoroutine(UpdateColorFade(from, to, duration));
}
private IEnumerable