using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DW.UI;
using System.Xml;
using Microsoft.Xna.Framework;
namespace DW.UI.ScreenObjects
{
///
/// Used to display Text.
///
public class TextDisplay : ScreenObject
{
string mName;
///
/// Sets the image and defaults the source to the entire image
///
public string name
{
get { return mName; }
set
{
mName = value;
}
}
///
/// Text display constructor.
///
public TextDisplay()
{
type = DisplayType.TEXT;
}
///
/// Text display constructor.
///
public TextDisplay(XmlNode node)
{
type = DisplayType.TEXT;
name = node.Attributes["nameID"].Value;
position = new Vector2(int.Parse(node.Attributes["posX"].Value), int.Parse(node.Attributes["posY"].Value));
visible = bool.Parse(node.Attributes["toDraw"].Value);
color = GetColor(node);
text = node.Attributes["text"].Value;
}
}
}