public override void OnInitialize() { UIElement element = new UIElement(); element.Width.Set(0.0f, 0.8f); element.MaxWidth.Set(650f, 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; this._containerPanel = uiPanel; element.Append((UIElement)uiPanel); this._playerList = new UIList(); this._playerList.Width.Set(-25f, 1f); this._playerList.Height.Set(0.0f, 1f); this._playerList.ListPadding = 5f; uiPanel.Append((UIElement)this._playerList); UIScrollbar scrollbar = new UIScrollbar(); scrollbar.SetView(100f, 1000f); scrollbar.Height.Set(0.0f, 1f); scrollbar.HAlign = 1f; uiPanel.Append((UIElement)scrollbar); this._playerList.SetScrollbar(scrollbar); UITextPanel <LocalizedText> uiTextPanel1 = new UITextPanel <LocalizedText>(Language.GetText("UI.SelectPlayer"), 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((UIElement)uiTextPanel1); UITextPanel <LocalizedText> uiTextPanel2 = new UITextPanel <LocalizedText>(Language.GetText("UI.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(this.FadedMouseOver); uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); uiTextPanel2.OnClick += new UIElement.MouseEvent(this.GoBackClick); uiTextPanel2.SetSnapPoint("Back", 0, new Vector2?(), new Vector2?()); element.Append((UIElement)uiTextPanel2); this._backPanel = uiTextPanel2; UITextPanel <LocalizedText> uiTextPanel3 = new UITextPanel <LocalizedText>(Language.GetText("UI.New"), 0.7f, true); uiTextPanel3.CopyStyle((UIElement)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); element.Append((UIElement)uiTextPanel3); uiTextPanel2.SetSnapPoint("New", 0, new Vector2?(), new Vector2?()); this._newPanel = uiTextPanel3; this.Append(element); }
public override void OnInitialize() { UIElement uIElement = new UIElement(); uIElement.Width.Set(0f, 0.8f); uIElement.MaxWidth.Set(650f, 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; _containerPanel = uIPanel; uIElement.Append(uIPanel); _playerList = new UIList(); _playerList.Width.Set(0f, 1f); _playerList.Height.Set(0f, 1f); _playerList.ListPadding = 5f; uIPanel.Append(_playerList); _scrollbar = new UIScrollbar(); _scrollbar.SetView(100f, 1000f); _scrollbar.Height.Set(0f, 1f); _scrollbar.HAlign = 1f; _playerList.SetScrollbar(_scrollbar); UITextPanel <LocalizedText> uITextPanel = new UITextPanel <LocalizedText>(Language.GetText("UI.SelectPlayer"), 0.8f, large: true); uITextPanel.HAlign = 0.5f; uITextPanel.Top.Set(-40f, 0f); uITextPanel.SetPadding(15f); uITextPanel.BackgroundColor = new Color(73, 94, 171); uIElement.Append(uITextPanel); UITextPanel <LocalizedText> uITextPanel2 = new UITextPanel <LocalizedText>(Language.GetText("UI.Back"), 0.7f, large: true); uITextPanel2.Width.Set(-10f, 0.5f); uITextPanel2.Height.Set(50f, 0f); uITextPanel2.VAlign = 1f; uITextPanel2.Top.Set(-45f, 0f); uITextPanel2.OnMouseOver += FadedMouseOver; uITextPanel2.OnMouseOut += FadedMouseOut; uITextPanel2.OnClick += GoBackClick; uITextPanel2.SetSnapPoint("Back", 0); uIElement.Append(uITextPanel2); _backPanel = uITextPanel2; UITextPanel <LocalizedText> uITextPanel3 = new UITextPanel <LocalizedText>(Language.GetText("UI.New"), 0.7f, large: true); uITextPanel3.CopyStyle(uITextPanel2); uITextPanel3.HAlign = 1f; uITextPanel3.OnMouseOver += FadedMouseOver; uITextPanel3.OnMouseOut += FadedMouseOut; uITextPanel3.OnClick += NewCharacterClick; uIElement.Append(uITextPanel3); uITextPanel2.SetSnapPoint("New", 0); _newPanel = uITextPanel3; Append(uIElement); }
private void AddBackAndFolderButtons(UIElement outerContainer) { UITextPanel <LocalizedText> uiTextPanel1 = new UITextPanel <LocalizedText>(Language.GetText("UI.Back"), 0.7f, true); uiTextPanel1.Width = new StyleDimension(-8f, 0.5f); uiTextPanel1.Height = new StyleDimension(50f, 0.0f); uiTextPanel1.VAlign = 1f; uiTextPanel1.HAlign = 0.0f; uiTextPanel1.Top = new StyleDimension(-45f, 0.0f); UITextPanel <LocalizedText> uiTextPanel2 = uiTextPanel1; uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(UIResourcePackSelectionMenu.FadedMouseOver); uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(UIResourcePackSelectionMenu.FadedMouseOut); uiTextPanel2.OnClick += new UIElement.MouseEvent(this.GoBackClick); uiTextPanel2.SetSnapPoint("GoBack", 0, new Vector2?(), new Vector2?()); outerContainer.Append((UIElement)uiTextPanel2); UITextPanel <LocalizedText> uiTextPanel3 = new UITextPanel <LocalizedText>(Language.GetText("GameUI.OpenFileFolder"), 0.7f, true); uiTextPanel3.Width = new StyleDimension(-8f, 0.5f); uiTextPanel3.Height = new StyleDimension(50f, 0.0f); uiTextPanel3.VAlign = 1f; uiTextPanel3.HAlign = 1f; uiTextPanel3.Top = new StyleDimension(-45f, 0.0f); UITextPanel <LocalizedText> uiTextPanel4 = uiTextPanel3; uiTextPanel4.OnMouseOver += new UIElement.MouseEvent(UIResourcePackSelectionMenu.FadedMouseOver); uiTextPanel4.OnMouseOut += new UIElement.MouseEvent(UIResourcePackSelectionMenu.FadedMouseOut); uiTextPanel4.OnClick += new UIElement.MouseEvent(this.OpenFoldersClick); uiTextPanel4.SetSnapPoint("OpenFolder", 0, new Vector2?(), new Vector2?()); outerContainer.Append((UIElement)uiTextPanel4); }
private void MakeBackAndCreatebuttons(UIElement outerContainer) { UITextPanel <LocalizedText> uITextPanel = new UITextPanel <LocalizedText>(Language.GetText("UI.Back"), 0.7f, large: true) { Width = StyleDimension.FromPixelsAndPercent(-10f, 0.5f), Height = StyleDimension.FromPixels(50f), VAlign = 1f, HAlign = 0f, Top = StyleDimension.FromPixels(-45f) }; uITextPanel.OnMouseOver += FadedMouseOver; uITextPanel.OnMouseOut += FadedMouseOut; uITextPanel.OnMouseDown += Click_GoBack; uITextPanel.SetSnapPoint("Back", 0); outerContainer.Append(uITextPanel); UITextPanel <LocalizedText> uITextPanel2 = new UITextPanel <LocalizedText>(Language.GetText("UI.Create"), 0.7f, large: true) { Width = StyleDimension.FromPixelsAndPercent(-10f, 0.5f), Height = StyleDimension.FromPixels(50f), VAlign = 1f, HAlign = 1f, Top = StyleDimension.FromPixels(-45f) }; uITextPanel2.OnMouseOver += FadedMouseOver; uITextPanel2.OnMouseOut += FadedMouseOut; uITextPanel2.OnMouseDown += Click_NamingAndCreating; uITextPanel2.SetSnapPoint("Create", 0); outerContainer.Append(uITextPanel2); }
private void MakeBackAndCreatebuttons(UIElement outerContainer) { UITextPanel <LocalizedText> uiTextPanel1 = new UITextPanel <LocalizedText>(Language.GetText("UI.Back"), 0.7f, true); uiTextPanel1.Width = StyleDimension.FromPixelsAndPercent(-10f, 0.5f); uiTextPanel1.Height = StyleDimension.FromPixels(50f); uiTextPanel1.VAlign = 1f; uiTextPanel1.HAlign = 0.0f; uiTextPanel1.Top = StyleDimension.FromPixels(-45f); UITextPanel <LocalizedText> uiTextPanel2 = uiTextPanel1; uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); uiTextPanel2.OnMouseDown += new UIElement.MouseEvent(this.Click_GoBack); uiTextPanel2.SetSnapPoint("Back", 0, new Vector2?(), new Vector2?()); outerContainer.Append((UIElement)uiTextPanel2); UITextPanel <LocalizedText> uiTextPanel3 = new UITextPanel <LocalizedText>(Language.GetText("UI.Create"), 0.7f, true); uiTextPanel3.Width = StyleDimension.FromPixelsAndPercent(-10f, 0.5f); uiTextPanel3.Height = StyleDimension.FromPixels(50f); uiTextPanel3.VAlign = 1f; uiTextPanel3.HAlign = 1f; uiTextPanel3.Top = StyleDimension.FromPixels(-45f); UITextPanel <LocalizedText> uiTextPanel4 = uiTextPanel3; uiTextPanel4.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); uiTextPanel4.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); uiTextPanel4.OnMouseDown += new UIElement.MouseEvent(this.Click_NamingAndCreating); uiTextPanel4.SetSnapPoint("Create", 0, new Vector2?(), new Vector2?()); outerContainer.Append((UIElement)uiTextPanel4); }
public void InitializePage() { RemoveAllChildren(); UIElement uIElement = new UIElement(); uIElement.Width.Set(590f, 0f); uIElement.Top.Set(220f, 0f); uIElement.Height.Set(-220f, 1f); uIElement.HAlign = 0.5f; _outerContainer = uIElement; Append(uIElement); 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); _container = uIPanel; UIList uIList = new UIList(); uIList.Width.Set(-25f, 1f); uIList.Height.Set(-50f, 1f); uIList.Top.Set(50f, 0f); uIList.HAlign = 0.5f; uIList.ListPadding = 14f; uIPanel.Append(uIList); _list = uIList; UIScrollbar uIScrollbar = new UIScrollbar(); uIScrollbar.SetView(100f, 1000f); uIScrollbar.Height.Set(-20f, 1f); uIScrollbar.HAlign = 1f; uIScrollbar.VAlign = 1f; uIScrollbar.Top = StyleDimension.FromPixels(-5f); uIList.SetScrollbar(uIScrollbar); _scrollBar = uIScrollbar; UITextPanel <LocalizedText> uITextPanel = new UITextPanel <LocalizedText>(Language.GetText("UI.Back"), 0.7f, large: true); uITextPanel.Width.Set(-10f, 0.5f); uITextPanel.Height.Set(50f, 0f); uITextPanel.VAlign = 1f; uITextPanel.HAlign = 0.5f; uITextPanel.Top.Set(-45f, 0f); uITextPanel.OnMouseOver += FadedMouseOver; uITextPanel.OnMouseOut += FadedMouseOut; uITextPanel.OnClick += GoBackClick; uITextPanel.SetSnapPoint("Back", 0); uIElement.Append(uITextPanel); _backPanel = uITextPanel; int currentGroupIndex = 0; TryAddingList(Language.GetText("UI.EmoteCategoryGeneral"), ref currentGroupIndex, 10, GetEmotesGeneral()); TryAddingList(Language.GetText("UI.EmoteCategoryRPS"), ref currentGroupIndex, 10, GetEmotesRPS()); TryAddingList(Language.GetText("UI.EmoteCategoryItems"), ref currentGroupIndex, 11, GetEmotesItems()); TryAddingList(Language.GetText("UI.EmoteCategoryBiomesAndEvents"), ref currentGroupIndex, 8, GetEmotesBiomesAndEvents()); TryAddingList(Language.GetText("UI.EmoteCategoryTownNPCs"), ref currentGroupIndex, 9, GetEmotesTownNPCs()); TryAddingList(Language.GetText("UI.EmoteCategoryCritters"), ref currentGroupIndex, 7, GetEmotesCritters()); TryAddingList(Language.GetText("UI.EmoteCategoryBosses"), ref currentGroupIndex, 8, GetEmotesBosses()); }
public void InitializePage() { this.RemoveAllChildren(); UIElement element = new UIElement(); element.Width.Set(590f, 0.0f); element.Top.Set(220f, 0.0f); element.Height.Set(-220f, 1f); element.HAlign = 0.5f; this._outerContainer = element; this.Append(element); UIPanel uiPanel = new UIPanel(); uiPanel.Width.Set(0.0f, 1f); uiPanel.Height.Set(-110f, 1f); uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; uiPanel.PaddingTop = 0.0f; element.Append((UIElement)uiPanel); this._container = (UIElement)uiPanel; UIList uiList = new UIList(); uiList.Width.Set(-25f, 1f); uiList.Height.Set(-50f, 1f); uiList.Top.Set(50f, 0.0f); uiList.HAlign = 0.5f; uiList.ListPadding = 14f; uiPanel.Append((UIElement)uiList); this._list = uiList; UIScrollbar scrollbar = new UIScrollbar(); scrollbar.SetView(100f, 1000f); scrollbar.Height.Set(-20f, 1f); scrollbar.HAlign = 1f; scrollbar.VAlign = 1f; scrollbar.Top = StyleDimension.FromPixels(-5f); uiList.SetScrollbar(scrollbar); this._scrollBar = scrollbar; UITextPanel <LocalizedText> uiTextPanel = new UITextPanel <LocalizedText>(Language.GetText("UI.Back"), 0.7f, true); uiTextPanel.Width.Set(-10f, 0.5f); uiTextPanel.Height.Set(50f, 0.0f); uiTextPanel.VAlign = 1f; uiTextPanel.HAlign = 0.5f; uiTextPanel.Top.Set(-45f, 0.0f); uiTextPanel.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); uiTextPanel.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); uiTextPanel.OnClick += new UIElement.MouseEvent(this.GoBackClick); uiTextPanel.SetSnapPoint("Back", 0, new Vector2?(), new Vector2?()); element.Append((UIElement)uiTextPanel); this._backPanel = (UIElement)uiTextPanel; int currentGroupIndex = 0; this.TryAddingList(Language.GetText("UI.EmoteCategoryGeneral"), ref currentGroupIndex, 10, this.GetEmotesGeneral()); this.TryAddingList(Language.GetText("UI.EmoteCategoryRPS"), ref currentGroupIndex, 10, this.GetEmotesRPS()); this.TryAddingList(Language.GetText("UI.EmoteCategoryItems"), ref currentGroupIndex, 11, this.GetEmotesItems()); this.TryAddingList(Language.GetText("UI.EmoteCategoryBiomesAndEvents"), ref currentGroupIndex, 8, this.GetEmotesBiomesAndEvents()); this.TryAddingList(Language.GetText("UI.EmoteCategoryTownNPCs"), ref currentGroupIndex, 9, this.GetEmotesTownNPCs()); this.TryAddingList(Language.GetText("UI.EmoteCategoryCritters"), ref currentGroupIndex, 7, this.GetEmotesCritters()); this.TryAddingList(Language.GetText("UI.EmoteCategoryBosses"), ref currentGroupIndex, 8, this.GetEmotesBosses()); }
private void AddBackAndFolderButtons(UIElement outerContainer) { UITextPanel <LocalizedText> uITextPanel = new UITextPanel <LocalizedText>(Language.GetText("UI.Back"), 0.7f, large: true) { Width = new StyleDimension(-8f, 0.5f), Height = new StyleDimension(50f, 0f), VAlign = 1f, HAlign = 0f, Top = new StyleDimension(-45f, 0f) }; uITextPanel.OnMouseOver += FadedMouseOver; uITextPanel.OnMouseOut += FadedMouseOut; uITextPanel.OnClick += GoBackClick; uITextPanel.SetSnapPoint("GoBack", 0); outerContainer.Append(uITextPanel); UITextPanel <LocalizedText> uITextPanel2 = new UITextPanel <LocalizedText>(Language.GetText("GameUI.OpenFileFolder"), 0.7f, large: true) { Width = new StyleDimension(-8f, 0.5f), Height = new StyleDimension(50f, 0f), VAlign = 1f, HAlign = 1f, Top = new StyleDimension(-45f, 0f) }; uITextPanel2.OnMouseOver += FadedMouseOver; uITextPanel2.OnMouseOut += FadedMouseOut; uITextPanel2.OnClick += OpenFoldersClick; uITextPanel2.SetSnapPoint("OpenFolder", 0); outerContainer.Append(uITextPanel2); }
private void BuildPage() { this.RemoveAllChildren(); UIElement element1 = new UIElement(); element1.Width.Set(0.0f, 0.8f); element1.MaxWidth.Set(500f, 0.0f); element1.MinWidth.Set(300f, 0.0f); element1.Top.Set(230f, 0.0f); element1.Height.Set(-element1.Top.Pixels, 1f); element1.HAlign = 0.5f; this.Append(element1); UIPanel uiPanel = new UIPanel(); uiPanel.Width.Set(0.0f, 1f); uiPanel.Height.Set(-110f, 1f); uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; element1.Append((UIElement)uiPanel); UIElement element2 = new UIElement() { Width = StyleDimension.Fill, Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f) }; uiPanel.Append(element2); UIElement element3 = new UIElement() { Width = new StyleDimension(0.0f, 1f), Height = new StyleDimension(52f, 0.0f) }; element3.SetPadding(0.0f); element2.Append(element3); UIText uiText1 = new UIText(this._pack.Name, 0.7f, true) { TextColor = Color.Gold }; uiText1.HAlign = 0.5f; uiText1.VAlign = 0.0f; element3.Append((UIElement)uiText1); UIText uiText2 = new UIText(Language.GetTextValue("UI.Author", (object)this._pack.Author), 0.9f, false); uiText2.HAlign = 0.0f; uiText2.VAlign = 1f; UIText uiText3 = uiText2; uiText3.Top.Set(-6f, 0.0f); element3.Append((UIElement)uiText3); UIText uiText4 = new UIText(Language.GetTextValue("UI.Version", (object)this._pack.Version.GetFormattedVersion()), 0.9f, false); uiText4.HAlign = 1f; uiText4.VAlign = 1f; uiText4.TextColor = Color.Silver; UIText uiText5 = uiText4; uiText5.Top.Set(-6f, 0.0f); element3.Append((UIElement)uiText5); Asset <Texture2D> asset = (Asset <Texture2D>)Main.Assets.Request <Texture2D>("Images/UI/Divider", (AssetRequestMode)1); UIImage uiImage1 = new UIImage(asset); uiImage1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); uiImage1.Height = StyleDimension.FromPixels((float)asset.Height()); uiImage1.ScaleToFit = true; UIImage uiImage2 = uiImage1; uiImage2.Top.Set(52f, 0.0f); uiImage2.SetPadding(6f); element2.Append((UIElement)uiImage2); UIElement element4 = new UIElement() { HAlign = 0.5f, VAlign = 1f, Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f), Height = StyleDimension.FromPixelsAndPercent(-74f, 1f) }; element2.Append(element4); this._container = element4; UIText uiText6 = new UIText(this._pack.Description, 1f, false); uiText6.HAlign = 0.5f; uiText6.VAlign = 0.0f; uiText6.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); uiText6.Height = StyleDimension.FromPixelsAndPercent(0.0f, 0.0f); uiText6.IsWrapped = true; uiText6.WrappedTextBottomPadding = 0.0f; UIText uiText7 = uiText6; UIList uiList1 = new UIList(); uiList1.HAlign = 0.5f; uiList1.VAlign = 0.0f; uiList1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); uiList1.Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f); uiList1.PaddingRight = 20f; UIList uiList2 = uiList1; uiList2.ListPadding = 5f; uiList2.Add((UIElement)uiText7); element4.Append((UIElement)uiList2); this._list = uiList2; UIScrollbar scrollbar = new UIScrollbar(); scrollbar.SetView(100f, 1000f); scrollbar.Height.Set(0.0f, 1f); scrollbar.HAlign = 1f; this._scrollbar = scrollbar; uiList2.SetScrollbar(scrollbar); UITextPanel <LocalizedText> uiTextPanel = new UITextPanel <LocalizedText>(Language.GetText("UI.Back"), 0.7f, true); uiTextPanel.Width.Set(-10f, 0.5f); uiTextPanel.Height.Set(50f, 0.0f); uiTextPanel.VAlign = 1f; uiTextPanel.HAlign = 0.5f; uiTextPanel.Top.Set(-45f, 0.0f); uiTextPanel.OnMouseOver += new UIElement.MouseEvent(UIResourcePackInfoMenu.FadedMouseOver); uiTextPanel.OnMouseOut += new UIElement.MouseEvent(UIResourcePackInfoMenu.FadedMouseOut); uiTextPanel.OnClick += new UIElement.MouseEvent(this.GoBackClick); uiTextPanel.SetSnapPoint("GoBack", 0, new Vector2?(), new Vector2?()); element1.Append((UIElement)uiTextPanel); }
private void BuildPage() { RemoveAllChildren(); UIElement uIElement = new UIElement(); uIElement.Width.Set(0f, 0.8f); uIElement.MaxWidth.Set(500f, 0f); uIElement.MinWidth.Set(300f, 0f); uIElement.Top.Set(230f, 0f); uIElement.Height.Set(0f - uIElement.Top.Pixels, 1f); uIElement.HAlign = 0.5f; Append(uIElement); 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); UIElement uIElement2 = new UIElement { Width = StyleDimension.Fill, Height = StyleDimension.FromPixelsAndPercent(0f, 1f) }; uIPanel.Append(uIElement2); UIElement uIElement3 = new UIElement { Width = new StyleDimension(0f, 1f), Height = new StyleDimension(52f, 0f) }; uIElement3.SetPadding(0f); uIElement2.Append(uIElement3); UIText uIText = new UIText(_pack.Name, 0.7f, large: true) { TextColor = Color.Gold }; uIText.HAlign = 0.5f; uIText.VAlign = 0f; uIElement3.Append(uIText); UIText uIText2 = new UIText(Language.GetTextValue("UI.Author", _pack.Author), 0.9f) { HAlign = 0f, VAlign = 1f }; uIText2.Top.Set(-6f, 0f); uIElement3.Append(uIText2); UIText uIText3 = new UIText(Language.GetTextValue("UI.Version", _pack.Version.GetFormattedVersion()), 0.9f) { HAlign = 1f, VAlign = 1f, TextColor = Color.Silver }; uIText3.Top.Set(-6f, 0f); uIElement3.Append(uIText3); Asset <Texture2D> val = Main.Assets.Request <Texture2D>("Images/UI/Divider", Main.content, (AssetRequestMode)1); UIImage uIImage = new UIImage(val) { Width = StyleDimension.FromPixelsAndPercent(0f, 1f), Height = StyleDimension.FromPixels(val.Height()), ScaleToFit = true }; uIImage.Top.Set(52f, 0f); uIImage.SetPadding(6f); uIElement2.Append(uIImage); UIElement uIElement4 = new UIElement { HAlign = 0.5f, VAlign = 1f, Width = StyleDimension.FromPixelsAndPercent(0f, 1f), Height = StyleDimension.FromPixelsAndPercent(-74f, 1f) }; uIElement2.Append(uIElement4); _container = uIElement4; UIText item = new UIText(_pack.Description) { HAlign = 0.5f, VAlign = 0f, Width = StyleDimension.FromPixelsAndPercent(0f, 1f), Height = StyleDimension.FromPixelsAndPercent(0f, 0f), IsWrapped = true, WrappedTextBottomPadding = 0f }; UIList uIList = new UIList { HAlign = 0.5f, VAlign = 0f, Width = StyleDimension.FromPixelsAndPercent(0f, 1f), Height = StyleDimension.FromPixelsAndPercent(0f, 1f), PaddingRight = 20f }; uIList.ListPadding = 5f; uIList.Add(item); uIElement4.Append(uIList); _list = uIList; UIScrollbar uIScrollbar = new UIScrollbar(); uIScrollbar.SetView(100f, 1000f); uIScrollbar.Height.Set(0f, 1f); uIScrollbar.HAlign = 1f; _scrollbar = uIScrollbar; uIList.SetScrollbar(uIScrollbar); UITextPanel <LocalizedText> uITextPanel = new UITextPanel <LocalizedText>(Language.GetText("UI.Back"), 0.7f, large: true); uITextPanel.Width.Set(-10f, 0.5f); uITextPanel.Height.Set(50f, 0f); uITextPanel.VAlign = 1f; uITextPanel.HAlign = 0.5f; uITextPanel.Top.Set(-45f, 0f); uITextPanel.OnMouseOver += FadedMouseOver; uITextPanel.OnMouseOut += FadedMouseOut; uITextPanel.OnClick += GoBackClick; uITextPanel.SetSnapPoint("GoBack", 0); uIElement.Append(uITextPanel); }