Пример #1
0
 public UIModManageItem(string displayname, string name, string version, string author, string downloads, string downloadsversion, string modloaderversion)
 {
     this.displayname = displayname;
     this.version = version;
     this.author = author;
     this.name = name;
     this.BorderColor = new Color(89, 116, 213) * 0.7f;
     this.dividerTexture = TextureManager.Load("Images/UI/Divider");
     this.Height.Set(90f, 0f);
     this.Width.Set(0f, 1f);
     base.SetPadding(6f);
     string text = displayname + " " + version + " - by " + author + " - " + modloaderversion;
     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>(downloads + " downloads (" + downloadsversion + " latest version)", 1f, false);
     button.Width.Set(260f, 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);
     base.Append(button);
     button2 = new UITextPanel<string>("Unpublish", 1f, false);
     button2.CopyStyle(button);
     button2.Width.Set(150f, 0f);
     button2.Left.Set(360f, 0f);
     button2.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
     button2.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
     button2.OnClick += new UIElement.MouseEvent(this.Unpublish);
     base.Append(button2);
 }
Пример #2
0
		public override void OnInitialize()
		{
			UIElement area = new UIElement();
			area.Width.Set(0f, 0.8f);
			area.Top.Set(200f, 0f);
			area.Height.Set(-240f, 1f);
			area.HAlign = 0.5f;
			message.Width.Set(0f, 1f);
			message.Height.Set(0f, 0.8f);
			message.HAlign = 0.5f;
			area.Append(message);
			UITextPanel button = new UITextPanel("Continue", 0.7f, true);
			button.Width.Set(-10f, 0.5f);
			button.Height.Set(50f, 0f);
			button.VAlign = 1f;
			button.Top.Set(-30f, 0f);
			button.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button.OnClick += new UIElement.MouseEvent(ContinueClick);
			area.Append(button);
			UITextPanel button2 = new UITextPanel("Open Logs", 0.7f, true);
			button2.CopyStyle(button);
			button2.HAlign = 1f;
			button2.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button2.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button2.OnClick += new UIElement.MouseEvent(OpenFile);
			area.Append(button2);
			base.Append(area);
		}
Пример #3
0
 public UIModSourceItem(string mod)
 {
     this.mod = mod;
     this.BorderColor = new Color(89, 116, 213) * 0.7f;
     this.dividerTexture = TextureManager.Load("Images/UI/Divider");
     this.Height.Set(90f, 0f);
     this.Width.Set(0f, 1f);
     base.SetPadding(6f);
     this.modName = new UIText(Path.GetFileName(mod), 1f, false);
     this.modName.Left.Set(10f, 0f);
     this.modName.Top.Set(5f, 0f);
     base.Append(this.modName);
     UITextPanel button = new UITextPanel("Build", 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.BuildMod);
     base.Append(button);
     UITextPanel button2 = new UITextPanel("Build + Reload", 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.BuildAndReload);
     base.Append(button2);
     base.OnDoubleClick += new UIElement.MouseEvent(this.BuildAndReload);
 }
        public override void OnInitialize()
        {
            UIElement uIElement = new UIElement();
            uIElement.Width.Set(0f, 0.8f);
            uIElement.MaxWidth.Set(600f, 0f);
            uIElement.Top.Set(220f, 0f);
            uIElement.Height.Set(-220f, 1f);
            uIElement.HAlign = 0.5f;

            UIPanel uIPanel = new UIPanel();
            uIPanel.Width.Set(0f, 1f);
            uIPanel.Height.Set(-110f, 1f);
            uIPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f;
            uIPanel.PaddingTop = 0f;
            uIElement.Append(uIPanel);

            uITextPanel = new UITextPanel<string>("Please Enter Your Passcode", 0.8f, true);
            uITextPanel.HAlign = 0.5f;
            uITextPanel.Top.Set(-35f, 0f);
            uITextPanel.SetPadding(15f);
            uITextPanel.BackgroundColor = new Color(73, 94, 171);
            uIElement.Append(uITextPanel);

            UITextPanel<string> button = new UITextPanel<string>("Back", 1f, false);
            button.Width.Set(-10f, 0.5f);
            button.Height.Set(25f, 0f);
            button.VAlign = 1f;
            button.Top.Set(-65f, 0f);
            button.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
            button.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
            button.OnClick += new UIElement.MouseEvent(BackClick);
            uIElement.Append(button);

            UITextPanel<string> button2 = new UITextPanel<string>("Submit", 1f, false);
            button2.CopyStyle(button);
            button2.HAlign = 1f;
            button2.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
            button2.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
            button2.OnClick += new UIElement.MouseEvent(OKClick);
            uIElement.Append(button2);

            UITextPanel<string> button3 = new UITextPanel<string>("Visit Website to Generate Passphrase", 1f, false);
            button3.CopyStyle(button);
            button3.Width.Set(0f, 1f);
            button3.Top.Set(-20f, 0f);
            button3.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
            button3.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
            button3.OnClick += new UIElement.MouseEvent(VisitRegisterWebpage);
            uIElement.Append(button3);

            passcodeTextField = new UIInputTextField("Paste Passphrase (ctrl-v)");
            passcodeTextField.HAlign = 0.5f;
            passcodeTextField.VAlign = 0.5f;
            passcodeTextField.Left.Set(-100, 0);
            passcodeTextField.OnTextChange += new UIInputTextField.EventHandler(OnTextChange);
            uIPanel.Append(passcodeTextField);

            base.Append(uIElement);
        }
Пример #5
0
		public UIModSourceItem(string mod)
		{
			this.mod = mod;
			this.BorderColor = new Color(89, 116, 213) * 0.7f;
			this.dividerTexture = TextureManager.Load("Images/UI/Divider");
			this.Height.Set(90f, 0f);
			this.Width.Set(0f, 1f);
			base.SetPadding(6f);
			this.modName = new UIText(Path.GetFileName(mod), 1f, false);
			this.modName.Left.Set(10f, 0f);
			this.modName.Top.Set(5f, 0f);
			base.Append(this.modName);
			UITextPanel button = new UITextPanel("Build", 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.BuildMod);
			base.Append(button);
			UITextPanel button2 = new UITextPanel("Build + Reload", 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.BuildAndReload);
			base.Append(button2);
			TmodFile[] modFiles = ModLoader.FindMods();
			foreach (TmodFile file in modFiles)
			{
				if (Path.GetFileNameWithoutExtension(file.Name).Equals(Path.GetFileName(mod)))
				{
					UITextPanel button3 = new UITextPanel("Publish", 1f, false);
					button3.CopyStyle(button2);
					button3.Width.Set(100f, 0f);
					button3.Left.Set(390f, 0f);
					button3.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
					button3.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
					button3.OnClick += new UIElement.MouseEvent(this.Publish);
					base.Append(button3);
				}
			}
			base.OnDoubleClick += new UIElement.MouseEvent(this.BuildAndReload);
		}
		public override void OnInitialize()
		{
			UIElement uIElement = new UIElement();
			uIElement.Width.Set(0f, 0.8f);
			uIElement.MaxWidth.Set(600f, 0f);
			uIElement.Top.Set(220f, 0f);
			uIElement.Height.Set(-220f, 1f);
			uIElement.HAlign = 0.5f;
			UIPanel uIPanel = new UIPanel();
			uIPanel.Width.Set(0f, 1f);
			uIPanel.Height.Set(-110f, 1f);
			uIPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f;
			uIElement.Append(uIPanel);
			this._playerList = new UIList();
			this._playerList.Width.Set(-25f, 1f);
			this._playerList.Height.Set(0f, 1f);
			this._playerList.ListPadding = 5f;
			uIPanel.Append(this._playerList);
			UIScrollbar uIScrollbar = new UIScrollbar();
			uIScrollbar.SetView(100f, 1000f);
			uIScrollbar.Height.Set(0f, 1f);
			uIScrollbar.HAlign = 1f;
			uIPanel.Append(uIScrollbar);
			this._playerList.SetScrollbar(uIScrollbar);
			UITextPanel uITextPanel = new UITextPanel("Select Player", 0.8f, true);
			uITextPanel.HAlign = 0.5f;
			uITextPanel.Top.Set(-35f, 0f);
			uITextPanel.SetPadding(15f);
			uITextPanel.BackgroundColor = new Color(73, 94, 171);
			uIElement.Append(uITextPanel);
			UITextPanel uITextPanel2 = new UITextPanel("Back", 0.7f, true);
			uITextPanel2.Width.Set(-10f, 0.5f);
			uITextPanel2.Height.Set(50f, 0f);
			uITextPanel2.VAlign = 1f;
			uITextPanel2.Top.Set(-45f, 0f);
			uITextPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver);
			uITextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut);
			uITextPanel2.OnClick += new UIElement.MouseEvent(this.GoBackClick);
			uIElement.Append(uITextPanel2);
			UITextPanel uITextPanel3 = new UITextPanel("New", 0.7f, true);
			uITextPanel3.CopyStyle(uITextPanel2);
			uITextPanel3.HAlign = 1f;
			uITextPanel3.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver);
			uITextPanel3.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut);
			uITextPanel3.OnClick += new UIElement.MouseEvent(this.NewCharacterClick);
			uIElement.Append(uITextPanel3);
			base.Append(uIElement);
		}
Пример #7
0
 public override void OnInitialize()
 {
     UIElement element = new UIElement();
     element.Width.Set(0.0f, 0.8f);
     element.MaxWidth.Set(600f, 0.0f);
     element.Top.Set(220f, 0.0f);
     element.Height.Set(-220f, 1f);
     element.HAlign = 0.5f;
     UIPanel uiPanel = new UIPanel();
     uiPanel.Width.Set(0.0f, 1f);
     uiPanel.Height.Set(-110f, 1f);
     uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f;
     element.Append(uiPanel);
     _worldList = new UIList();
     _worldList.Width.Set(-25f, 1f);
     _worldList.Height.Set(0.0f, 1f);
     _worldList.ListPadding = 5f;
     uiPanel.Append(_worldList);
     UIScrollbar scrollbar = new UIScrollbar();
     scrollbar.SetView(100f, 1000f);
     scrollbar.Height.Set(0.0f, 1f);
     scrollbar.HAlign = 1f;
     uiPanel.Append(scrollbar);
     _worldList.SetScrollbar(scrollbar);
     UITextPanel uiTextPanel1 = new UITextPanel("Select World", 0.8f, true);
     uiTextPanel1.HAlign = 0.5f;
     uiTextPanel1.Top.Set(-35f, 0.0f);
     uiTextPanel1.SetPadding(15f);
     uiTextPanel1.BackgroundColor = new Color(73, 94, 171);
     element.Append(uiTextPanel1);
     UITextPanel uiTextPanel2 = new UITextPanel("Back", 0.7f, true);
     uiTextPanel2.Width.Set(-10f, 0.5f);
     uiTextPanel2.Height.Set(50f, 0.0f);
     uiTextPanel2.VAlign = 1f;
     uiTextPanel2.Top.Set(-45f, 0.0f);
     uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
     uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
     uiTextPanel2.OnClick += new UIElement.MouseEvent(GoBackClick);
     element.Append(uiTextPanel2);
     UITextPanel uiTextPanel3 = new UITextPanel("New", 0.7f, true);
     uiTextPanel3.CopyStyle(uiTextPanel2);
     uiTextPanel3.HAlign = 1f;
     uiTextPanel3.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
     uiTextPanel3.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
     uiTextPanel3.OnClick += new UIElement.MouseEvent(NewWorldClick);
     element.Append(uiTextPanel3);
     Append(element);
 }
Пример #8
0
 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);
 }
Пример #9
0
 public override void OnInitialize()
 {
     UIElement uIElement = new UIElement();
     uIElement.Width.Set(0f, 0.8f);
     uIElement.MaxWidth.Set(600f, 0f);
     uIElement.Top.Set(220f, 0f);
     uIElement.Height.Set(-220f, 1f);
     uIElement.HAlign = 0.5f;
     UIPanel uIPanel = new UIPanel();
     uIPanel.Width.Set(0f, 1f);
     uIPanel.Height.Set(-110f, 1f);
     uIPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f;
     uIElement.Append(uIPanel);
     modList = new UIList();
     modList.Width.Set(-25f, 1f);
     modList.Height.Set(0f, 1f);
     modList.ListPadding = 5f;
     uIPanel.Append(modList);
     UIScrollbar uIScrollbar = new UIScrollbar();
     uIScrollbar.SetView(100f, 1000f);
     uIScrollbar.Height.Set(0f, 1f);
     uIScrollbar.HAlign = 1f;
     uIPanel.Append(uIScrollbar);
     modList.SetScrollbar(uIScrollbar);
     UITextPanel uITextPanel = new UITextPanel("Mods List", 0.8f, true);
     uITextPanel.HAlign = 0.5f;
     uITextPanel.Top.Set(-35f, 0f);
     uITextPanel.SetPadding(15f);
     uITextPanel.BackgroundColor = new Color(73, 94, 171);
     uIElement.Append(uITextPanel);
     UIColorTextPanel button = new UIColorTextPanel("Enable All", Color.Green, 1f, false);
     button.Width.Set(-10f, 0.5f);
     button.Height.Set(25f, 0f);
     button.VAlign = 1f;
     button.Top.Set(-65f, 0f);
     button.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
     button.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
     button.OnClick += new UIElement.MouseEvent(this.EnableAll);
     uIElement.Append(button);
     UIColorTextPanel button2 = new UIColorTextPanel("Disable All", Color.Red, 1f, false);
     button2.CopyStyle(button);
     button2.HAlign = 1f;
     button2.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
     button2.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
     button2.OnClick += new UIElement.MouseEvent(this.DisableAll);
     uIElement.Append(button2);
     UITextPanel uITextPanel2 = new UITextPanel("Back", 1f, false);
     uITextPanel2.CopyStyle(button);
     uITextPanel2.Top.Set(-20f, 0f);
     uITextPanel2.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
     uITextPanel2.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
     uITextPanel2.OnClick += new UIElement.MouseEvent(BackClick);
     uIElement.Append(uITextPanel2);
     UITextPanel uITextPanel3 = new UITextPanel("Reload Mods", 1f, false);
     uITextPanel3.CopyStyle(uITextPanel2);
     uITextPanel3.HAlign = 1f;
     uITextPanel3.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
     uITextPanel3.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
     uITextPanel3.OnClick += new UIElement.MouseEvent(ReloadMods);
     uIElement.Append(uITextPanel3);
     base.Append(uIElement);
 }
Пример #10
0
		public override void OnInitialize()
		{
			UIElement uIElement = new UIElement();
			uIElement.Width.Set(0f, 0.8f);
			uIElement.MaxWidth.Set(600f, 0f);
			uIElement.Top.Set(220f, 0f);
			uIElement.Height.Set(-220f, 1f);
			uIElement.HAlign = 0.5f;
			UIPanel uIPanel = new UIPanel();
			uIPanel.Width.Set(0f, 1f);
			uIPanel.Height.Set(-110f, 1f);
			uIPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f;
			uIElement.Append(uIPanel);
			modListAll = new UIList();
			modList = new UIList();
			modList.Width.Set(-25f, 1f);
			modList.Height.Set(0f, 1f);
			modList.ListPadding = 5f;
			uIPanel.Append(modList);
			UIScrollbar uIScrollbar = new UIScrollbar();
			uIScrollbar.SetView(100f, 1000f);
			uIScrollbar.Height.Set(0f, 1f);
			uIScrollbar.HAlign = 1f;
			uIPanel.Append(uIScrollbar);
			modList.SetScrollbar(uIScrollbar);
			UITextPanel uITextPanel = new UITextPanel("Mods List", 0.8f, true);
			uITextPanel.HAlign = 0.5f;
			uITextPanel.Top.Set(-35f, 0f);
			uITextPanel.SetPadding(15f);
			uITextPanel.BackgroundColor = new Color(73, 94, 171);
			uIElement.Append(uITextPanel);
			UIColorTextPanel button = new UIColorTextPanel("Enable All", Color.Green, 1f, false);
			button.Width.Set(-10f, 1f / 3f);
			button.Height.Set(25f, 0f);
			button.VAlign = 1f;
			button.Top.Set(-65f, 0f);
			button.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button.OnClick += new UIElement.MouseEvent(this.EnableAll);
			uIElement.Append(button);
			UIColorTextPanel button2 = new UIColorTextPanel("Disable All", Color.Red, 1f, false);
			button2.CopyStyle(button);
			button2.HAlign = 0.5f;
			button2.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button2.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button2.OnClick += new UIElement.MouseEvent(this.DisableAll);
			uIElement.Append(button2);
			UITextPanel button3 = new UITextPanel("Reload Mods", 1f, false);
			button3.CopyStyle(button);
			button3.HAlign = 1f;
			button3.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button3.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button3.OnClick += new UIElement.MouseEvent(ReloadMods);
			uIElement.Append(button3);
			UITextPanel button4 = new UITextPanel("Back", 1f, false);
			button4.CopyStyle(button);
			button4.Top.Set(-20f, 0f);
			button4.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button4.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button4.OnClick += new UIElement.MouseEvent(BackClick);
			uIElement.Append(button4);
			UITextPanel button5 = new UITextPanel("Open Mods Folder", 1f, false);
			button5.CopyStyle(button4);
			button5.HAlign = 0.5f;
			button5.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button5.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button5.OnClick += new UIElement.MouseEvent(OpenModsFolder);
			uIElement.Append(button5);
			UIPanel panel = new UIPanel();
			panel.Top.Set(-40f, 0f);
			panel.Left.Set(-200f, 1f);
			panel.Width.Set(200f, 0f);
			panel.Height.Set(40f, 0f);
			uIPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f;
			uIElement.Append(panel);
			filterTextBox = new UIInputTextField("Type to search");
			filterTextBox.Top.Set(-30f, 0f);
			filterTextBox.Left.Set(-180f, 1f);
			filterTextBox.OnTextChange += new UIInputTextField.EventHandler(FilterList);
			uIElement.Append(filterTextBox);
			UITextPanel modListButton = new UITextPanel("Mod Packs", 1f, false);
			modListButton.CopyStyle(button5);
			modListButton.HAlign = 1f;
			modListButton.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			modListButton.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			modListButton.OnClick += new UIElement.MouseEvent(GotoModPacksMenu);
			uIElement.Append(modListButton);
			base.Append(uIElement);
		}
Пример #11
0
		public override void OnInitialize()
		{
			UIElement uIElement = new UIElement();
			uIElement.Width.Set(0f, 0.8f);
			uIElement.MaxWidth.Set(600f, 0f);
			uIElement.Top.Set(220f, 0f);
			uIElement.Height.Set(-220f, 1f);
			uIElement.HAlign = 0.5f;
			UIPanel uIPanel = new UIPanel();
			uIPanel.Width.Set(0f, 1f);
			uIPanel.Height.Set(-110f, 1f);
			uIPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f;
			uIElement.Append(uIPanel);
			modList = new UIList();
			modList.Width.Set(-25f, 1f);
			modList.Height.Set(0f, 1f);
			modList.ListPadding = 5f;
			uIPanel.Append(modList);
			UIScrollbar uIScrollbar = new UIScrollbar();
			uIScrollbar.SetView(100f, 1000f);
			uIScrollbar.Height.Set(0f, 1f);
			uIScrollbar.HAlign = 1f;
			uIPanel.Append(uIScrollbar);
			modList.SetScrollbar(uIScrollbar);
			UITextPanel uITextPanel = new UITextPanel("Mod Sources", 0.8f, true);
			uITextPanel.HAlign = 0.5f;
			uITextPanel.Top.Set(-35f, 0f);
			uITextPanel.SetPadding(15f);
			uITextPanel.BackgroundColor = new Color(73, 94, 171);
			uIElement.Append(uITextPanel);
			UITextPanel button = new UITextPanel("Build All", 1f, false);
			button.Width.Set(-10f, 0.5f);
			button.Height.Set(25f, 0f);
			button.VAlign = 1f;
			button.Top.Set(-65f, 0f);
			button.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button.OnClick += new UIElement.MouseEvent(BuildMods);
			uIElement.Append(button);
			UITextPanel button2 = new UITextPanel("Build + Reload All", 1f, false);
			button2.CopyStyle(button);
			button2.HAlign = 1f;
			button2.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button2.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button2.OnClick += new UIElement.MouseEvent(BuildAndReload);
			uIElement.Append(button2);
			UITextPanel button3 = new UITextPanel("Back", 1f, false);
			button3.CopyStyle(button);
			button3.Width.Set(-10f, 1f / 3f);
			button3.Top.Set(-20f, 0f);
			button3.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button3.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button3.OnClick += new UIElement.MouseEvent(BackClick);
			uIElement.Append(button3);
			UITextPanel button4 = new UITextPanel("Open Sources", 1f, false);
			button4.CopyStyle(button3);
			button4.HAlign = .5f;
			button4.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button4.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button4.OnClick += new UIElement.MouseEvent(OpenSources);
			uIElement.Append(button4);
			UITextPanel button5 = new UITextPanel("Manage Published", 1f, false);
			button5.CopyStyle(button3);
			button5.HAlign = 1f;
			button5.OnMouseOver += new UIElement.MouseEvent(FadedMouseOver);
			button5.OnMouseOut += new UIElement.MouseEvent(FadedMouseOut);
			button5.OnClick += new UIElement.MouseEvent(ManagePublished);
			uIElement.Append(button5);
			base.Append(uIElement);
		}