Ejemplo n.º 1
0
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
            if (!updateNeeded)
            {
                return;
            }

            updateNeeded = false;
            if (!loading)
            {
                uIPanel.RemoveChild(uILoader);
            }

            filter = filterTextBox.currentString;
            modList.Clear();
            modList.AddRange(items.Where(item => item.PassFilters()));
            bool hasNoModsFoundNotif = modList.HasChild(uINoModsFoundText);

            if (modList.Count <= 0 && !hasNoModsFoundNotif)
            {
                modList.Add(uINoModsFoundText);
            }
            else if (hasNoModsFoundNotif)
            {
                modList.RemoveChild(uINoModsFoundText);
            }

            uIElement.RemoveChild(updateAllButton);
            if (SpecialModPackFilter == null && items.Count(x => x.update && !x.updateIsDowngrade) > 0)
            {
                uIElement.Append(updateAllButton);
            }
        }