public UIGizmoPropertyFilters(UIScript script, UIGizmo parent) { Background = script.Create <UIImage>("BackgroundImageFilters"); this.Add(Background); var ui = Content.Content.Get().CustomUI; var commFilter = new UIButton(ui.Get("lotp_community_large.png").Get(GameFacade.GraphicsDevice)); commFilter.ID = "PropertyFilterButton_Community"; var where = parent.GetChildren().First(x => x.ID == "PropertyFilterButton_WhereIveBeen"); commFilter.Position = where.Position - new Microsoft.Xna.Framework.Vector2(1, 3); commFilter.Tooltip = GameFacade.Strings.GetString("f115", "92"); parent.Add(commFilter); where.X += 47; var filterChildren = parent.GetChildren().Where(x => x.ID != null && x.ID.StartsWith("PropertyFilterButton_")).ToList(); foreach (var child in filterChildren) { child.Parent.Remove(child); this.Add(child); ((UIButton)child).OnButtonClick += FilterClicked; } }
public UIGizmoPropertyFilters(UIScript script, UIGizmo parent) { Background = script.Create <UIImage>("BackgroundImageFilters"); this.Add(Background); var filterChildren = parent.GetChildren().Where(x => x.ID != null && x.ID.StartsWith("PropertyFilterButton_")).ToList(); foreach (var child in filterChildren) { child.Parent.Remove(child); this.Add(child); } }
public UIGizmoPropertyFilters(UIScript script, UIGizmo parent) { Background = script.Create<UIImage>("BackgroundImageFilters"); this.Add(Background); var filterChildren = parent.GetChildren().Where(x => x.ID != null && x.ID.StartsWith("PropertyFilterButton_")).ToList(); foreach (var child in filterChildren) { child.Parent.Remove(child); this.Add(child); } }