public UIModDownloadItem(string displayname, string name, string version, string author, string description, string homepage, string download, int downloads, string timeStamp, bool update, bool exists)
{
this.displayname = displayname;
this.mod = name;
this.version = version;
this.author = author;
this.description = description;
this.homepage = homepage;
this.download = download;
this.downloads = downloads;
this.timeStamp = timeStamp;
this.update = update;
this.exists = exists;
this.BorderColor = new Color(89, 116, 213) * 0.7f;
this.dividerTexture = TextureManager.Load("Images/UI/Divider");
this.innerPanelTexture = TextureManager.Load("Images/UI/InnerPanelBackground");
this.Height.Set(90f, 0f);
this.Width.Set(0f, 1f);
base.SetPadding(6f);
string text = displayname + " " + version + " - by " + author;
this.modName = new UIText(text, 1f, false);
this.modName.Left.Set(10f, 0f);
this.modName.Top.Set(5f, 0f);
base.Append(this.modName);
UITextPanel<string> button = new UITextPanel<string>("More info", 1f, false);
button.Width.Set(100f, 0f);
button.Height.Set(30f, 0f);
button.Left.Set(10f, 0f);
button.Top.Set(40f, 0f);
button.PaddingTop -= 2f;
button.PaddingBottom -= 2f;
button.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
button.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
button.OnClick += new UIElement.MouseEvent(this.Moreinfo);
base.Append(button);
if (update || !exists)
{
button2 = new UITextPanel<string>(this.update ? "Update" : "Download", 1f, false);
button2.CopyStyle(button);
button2.Width.Set(200f, 0f);
button2.Left.Set(150f, 0f);
button2.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
button2.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
button2.OnClick += new UIElement.MouseEvent(this.DownloadMod);
base.Append(button2);
}
base.OnDoubleClick += new UIElement.MouseEvent(this.Moreinfo);
}