public bool Initialize(string text, int x, int y, int width, int height, bool isReadOnly, Random r, out string reason)
{
xPos = x;
yPos = y;
this.width = width;
this.height = height;
HighlightColor = Color.FromArgb(125, 0, 125, 125);
//Allows us to have transparency on our highlight rectangle
Gorgon.Screen.BlendingMode = BlendingModes.Modulated;
background = new BBStretchableImage();
if (!background.Initialize(x, y, width, height, StretchableImageType.TextBox, r, out reason))
{
return false;
}
Text = string.Empty;
this.text = new BBLabel();
if (!this.text.Initialize(x + 6, y + 7, text, Color.White, out reason))
{
return false;
}
pressed = false;
isSelected = false;
blink = true;
this.isReadOnly = isReadOnly;
reason = null;
return true;
}