using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace pcd_g1
{
	class InformDialogWidghet : IWidghet
	{
		public int X { get; private set; }
		public int Y { get; private set; }
		public int Width { get; private set; }
		public int Height { get; private set; }
		public bool IsModal { get; private set; }
		public bool IsSleeping { get { return true; } }
		public bool Visibility { get { return true; } }

		string message;

		public InformDialogWidghet(string msg, bool isModal = true, int x = 10, int y = 300, int width = 620, int height = 170)
		{
			X = x; Y = y; Width = width; Height = height;
			message = msg; IsModal = isModal;
			backBrush = new SolidBrush(Color.FromArgb(150, 0, 0, 0));
			font = new Font("MS Gothic", 30);
		}

		public bool Update(int keyStatus)
		{
			return false;
		}

		Brush backBrush;
		Font font;
		public void Draw(Graphics g, int width, int height)
		{
			g.FillRectangle(backBrush, 0, 0, width, height);
			g.DrawString(message, font, Brushes.White, new Rectangle(0, 0, width, height));
		}

	}
}
