2019-01-24 16:43:03 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using osu.Framework.Allocation;
|
2019-02-21 18:04:31 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Colour;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Cursor;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
|
using osu.Framework.Graphics.UserInterface;
|
2020-02-12 12:05:26 +08:00
|
|
|
|
using osu.Framework.Input.Events;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Framework.Localisation;
|
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Beatmaps.Drawables;
|
2020-09-02 20:08:31 +08:00
|
|
|
|
using osu.Game.Collections;
|
2019-02-12 12:04:46 +08:00
|
|
|
|
using osu.Game.Graphics;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
|
|
|
|
using osu.Game.Overlays;
|
2019-08-24 05:06:28 +08:00
|
|
|
|
using osu.Game.Rulesets;
|
2018-11-20 15:51:59 +08:00
|
|
|
|
using osuTK;
|
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Select.Carousel
|
|
|
|
|
{
|
|
|
|
|
public class DrawableCarouselBeatmapSet : DrawableCarouselItem, IHasContextMenu
|
|
|
|
|
{
|
2020-10-12 11:37:41 +08:00
|
|
|
|
public const float HEIGHT = MAX_HEIGHT;
|
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
private Action<BeatmapSetInfo> restoreHiddenRequested;
|
|
|
|
|
private Action<int> viewDetails;
|
|
|
|
|
|
2020-02-14 21:59:51 +08:00
|
|
|
|
[Resolved(CanBeNull = true)]
|
2020-02-14 21:14:00 +08:00
|
|
|
|
private DialogOverlay dialogOverlay { get; set; }
|
2020-02-14 21:30:27 +08:00
|
|
|
|
|
2020-09-09 14:39:15 +08:00
|
|
|
|
[Resolved(CanBeNull = true)]
|
2020-09-09 14:31:08 +08:00
|
|
|
|
private CollectionManager collectionManager { get; set; }
|
2020-09-02 20:08:31 +08:00
|
|
|
|
|
2020-09-05 02:52:07 +08:00
|
|
|
|
[Resolved(CanBeNull = true)]
|
2020-09-07 20:08:48 +08:00
|
|
|
|
private ManageCollectionsDialog manageCollectionsDialog { get; set; }
|
2020-09-05 02:52:07 +08:00
|
|
|
|
|
2020-10-12 13:23:18 +08:00
|
|
|
|
public override IEnumerable<DrawableCarouselItem> ChildItems => beatmapContainer?.Children ?? base.ChildItems;
|
|
|
|
|
|
2020-10-12 14:36:03 +08:00
|
|
|
|
private BeatmapSetInfo beatmapSet => (Item as CarouselBeatmapSet)?.BeatmapSet;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2020-10-12 13:23:18 +08:00
|
|
|
|
private Container<DrawableCarouselBeatmap> beatmapContainer;
|
|
|
|
|
private Bindable<CarouselItemState> beatmapSetState;
|
|
|
|
|
|
2020-10-12 14:36:03 +08:00
|
|
|
|
[Resolved]
|
|
|
|
|
private BeatmapManager manager { get; set; }
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader(true)]
|
2020-10-12 14:36:03 +08:00
|
|
|
|
private void load(BeatmapSetOverlay beatmapOverlay)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
restoreHiddenRequested = s => s.Beatmaps.ForEach(manager.Restore);
|
2020-04-16 11:13:26 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
if (beatmapOverlay != null)
|
2018-04-18 15:04:02 +08:00
|
|
|
|
viewDetails = beatmapOverlay.FetchAndShowBeatmapSet;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2020-10-12 14:36:03 +08:00
|
|
|
|
// TODO: temporary. we probably want to *not* inherit DrawableCarouselItem for this class, but only the above header portion.
|
|
|
|
|
AddRangeInternal(new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
beatmapContainer = new Container<DrawableCarouselBeatmap>
|
|
|
|
|
{
|
|
|
|
|
X = 50,
|
|
|
|
|
Y = MAX_HEIGHT,
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void UpdateItem()
|
|
|
|
|
{
|
|
|
|
|
base.UpdateItem();
|
|
|
|
|
|
|
|
|
|
Content.Children = new Drawable[]
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2018-09-06 16:27:21 +08:00
|
|
|
|
new DelayedLoadUnloadWrapper(() =>
|
2019-03-17 12:43:23 +08:00
|
|
|
|
{
|
|
|
|
|
var background = new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
|
2019-02-28 12:31:40 +08:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2019-03-17 12:43:23 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
background.OnLoadComplete += d => d.FadeInFromZero(1000, Easing.OutQuint);
|
|
|
|
|
|
|
|
|
|
return background;
|
|
|
|
|
}, 300, 5000
|
2018-04-13 17:19:50 +08:00
|
|
|
|
),
|
|
|
|
|
new FillFlowContainer
|
|
|
|
|
{
|
|
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
|
Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 },
|
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
2018-09-19 13:07:46 +08:00
|
|
|
|
Text = new LocalisedString((beatmapSet.Metadata.TitleUnicode, beatmapSet.Metadata.Title)),
|
2019-02-12 12:04:46 +08:00
|
|
|
|
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 22, italics: true),
|
2018-04-13 17:19:50 +08:00
|
|
|
|
Shadow = true,
|
|
|
|
|
},
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
2018-09-19 13:07:46 +08:00
|
|
|
|
Text = new LocalisedString((beatmapSet.Metadata.ArtistUnicode, beatmapSet.Metadata.Artist)),
|
2019-02-12 12:04:46 +08:00
|
|
|
|
Font = OsuFont.GetFont(weight: FontWeight.SemiBold, size: 17, italics: true),
|
2018-04-13 17:19:50 +08:00
|
|
|
|
Shadow = true,
|
|
|
|
|
},
|
2018-09-13 16:18:20 +08:00
|
|
|
|
new FillFlowContainer
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2018-09-13 16:18:20 +08:00
|
|
|
|
Direction = FillDirection.Horizontal,
|
2018-04-13 17:19:50 +08:00
|
|
|
|
AutoSizeAxes = Axes.Both,
|
2018-09-13 16:18:20 +08:00
|
|
|
|
Margin = new MarginPadding { Top = 5 },
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2018-09-20 11:35:07 +08:00
|
|
|
|
new BeatmapSetOnlineStatusPill
|
2018-09-13 16:18:20 +08:00
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.CentreLeft,
|
|
|
|
|
Anchor = Anchor.CentreLeft,
|
2018-09-20 11:56:39 +08:00
|
|
|
|
Margin = new MarginPadding { Right = 5 },
|
2018-09-20 11:35:07 +08:00
|
|
|
|
TextSize = 11,
|
|
|
|
|
TextPadding = new MarginPadding { Horizontal = 8, Vertical = 2 },
|
2018-09-13 16:18:20 +08:00
|
|
|
|
Status = beatmapSet.Status
|
|
|
|
|
},
|
2019-08-24 05:06:28 +08:00
|
|
|
|
new FillFlowContainer<DifficultyIcon>
|
2018-09-13 16:18:20 +08:00
|
|
|
|
{
|
|
|
|
|
AutoSizeAxes = Axes.Both,
|
2019-08-21 20:16:06 +08:00
|
|
|
|
Spacing = new Vector2(3),
|
2019-08-25 11:05:46 +08:00
|
|
|
|
ChildrenEnumerable = getDifficultyIcons(),
|
2018-09-13 16:18:20 +08:00
|
|
|
|
},
|
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
2020-10-12 13:23:18 +08:00
|
|
|
|
|
2020-10-12 14:36:03 +08:00
|
|
|
|
beatmapContainer.Clear();
|
2020-10-12 13:23:18 +08:00
|
|
|
|
|
|
|
|
|
beatmapSetState = Item.State.GetBoundCopy();
|
|
|
|
|
beatmapSetState.BindValueChanged(setSelected, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setSelected(ValueChangedEvent<CarouselItemState> obj)
|
|
|
|
|
{
|
|
|
|
|
switch (obj.NewValue)
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
beatmapContainer.Clear();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CarouselItemState.Selected:
|
|
|
|
|
|
|
|
|
|
float yPos = 0;
|
|
|
|
|
|
2020-10-12 14:36:03 +08:00
|
|
|
|
var carouselBeatmapSet = (CarouselBeatmapSet)Item;
|
|
|
|
|
|
|
|
|
|
foreach (var item in carouselBeatmapSet.Children)
|
2020-10-12 13:23:18 +08:00
|
|
|
|
{
|
2020-10-12 14:36:03 +08:00
|
|
|
|
var beatmapPanel = item.CreateDrawableRepresentation();
|
|
|
|
|
|
|
|
|
|
beatmapPanel.Y = yPos;
|
|
|
|
|
yPos += item.TotalHeight;
|
|
|
|
|
|
|
|
|
|
beatmapContainer.Add((DrawableCarouselBeatmap)beatmapPanel);
|
2020-10-12 13:23:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-08-24 05:06:28 +08:00
|
|
|
|
private const int maximum_difficulty_icons = 18;
|
|
|
|
|
|
2019-08-25 11:05:46 +08:00
|
|
|
|
private IEnumerable<DifficultyIcon> getDifficultyIcons()
|
2019-08-24 05:06:28 +08:00
|
|
|
|
{
|
|
|
|
|
var beatmaps = ((CarouselBeatmapSet)Item).Beatmaps.ToList();
|
|
|
|
|
|
2019-08-25 11:05:46 +08:00
|
|
|
|
return beatmaps.Count > maximum_difficulty_icons
|
|
|
|
|
? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.Beatmap.Ruleset).Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Key))
|
|
|
|
|
: beatmaps.Select(b => new FilterableDifficultyIcon(b));
|
2019-08-24 05:06:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
public MenuItem[] ContextMenuItems
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
List<MenuItem> items = new List<MenuItem>();
|
|
|
|
|
|
2019-02-21 17:56:34 +08:00
|
|
|
|
if (Item.State.Value == CarouselItemState.NotSelected)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
items.Add(new OsuMenuItem("Expand", MenuItemType.Highlighted, () => Item.State.Value = CarouselItemState.Selected));
|
|
|
|
|
|
2020-04-16 11:13:26 +08:00
|
|
|
|
if (beatmapSet.OnlineBeatmapSetID != null && viewDetails != null)
|
|
|
|
|
items.Add(new OsuMenuItem("Details...", MenuItemType.Standard, () => viewDetails(beatmapSet.OnlineBeatmapSetID.Value)));
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2020-09-09 14:39:15 +08:00
|
|
|
|
if (collectionManager != null)
|
|
|
|
|
{
|
|
|
|
|
var collectionItems = collectionManager.Collections.Select(createCollectionMenuItem).ToList();
|
|
|
|
|
if (manageCollectionsDialog != null)
|
|
|
|
|
collectionItems.Add(new OsuMenuItem("Manage...", MenuItemType.Standard, manageCollectionsDialog.Show));
|
2020-09-05 02:52:07 +08:00
|
|
|
|
|
2020-09-09 14:39:15 +08:00
|
|
|
|
items.Add(new OsuMenuItem("Collections") { Items = collectionItems });
|
|
|
|
|
}
|
2020-09-02 20:08:31 +08:00
|
|
|
|
|
2020-09-08 11:04:35 +08:00
|
|
|
|
if (beatmapSet.Beatmaps.Any(b => b.Hidden))
|
|
|
|
|
items.Add(new OsuMenuItem("Restore all hidden", MenuItemType.Standard, () => restoreHiddenRequested(beatmapSet)));
|
|
|
|
|
|
|
|
|
|
if (dialogOverlay != null)
|
2020-09-08 11:18:08 +08:00
|
|
|
|
items.Add(new OsuMenuItem("Delete...", MenuItemType.Destructive, () => dialogOverlay.Push(new BeatmapDeleteDialog(beatmapSet))));
|
2018-04-13 17:19:50 +08:00
|
|
|
|
return items.ToArray();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-02 20:08:31 +08:00
|
|
|
|
private MenuItem createCollectionMenuItem(BeatmapCollection collection)
|
|
|
|
|
{
|
|
|
|
|
TernaryState state;
|
|
|
|
|
|
|
|
|
|
var countExisting = beatmapSet.Beatmaps.Count(b => collection.Beatmaps.Contains(b));
|
|
|
|
|
|
|
|
|
|
if (countExisting == beatmapSet.Beatmaps.Count)
|
|
|
|
|
state = TernaryState.True;
|
|
|
|
|
else if (countExisting > 0)
|
|
|
|
|
state = TernaryState.Indeterminate;
|
|
|
|
|
else
|
|
|
|
|
state = TernaryState.False;
|
|
|
|
|
|
2020-09-05 03:43:51 +08:00
|
|
|
|
return new TernaryStateMenuItem(collection.Name.Value, MenuItemType.Standard, s =>
|
2020-09-02 20:08:31 +08:00
|
|
|
|
{
|
|
|
|
|
foreach (var b in beatmapSet.Beatmaps)
|
|
|
|
|
{
|
|
|
|
|
switch (s)
|
|
|
|
|
{
|
|
|
|
|
case TernaryState.True:
|
|
|
|
|
if (collection.Beatmaps.Contains(b))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
collection.Beatmaps.Add(b);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case TernaryState.False:
|
|
|
|
|
collection.Beatmaps.Remove(b);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
{
|
|
|
|
|
State = { Value = state }
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
private class PanelBackground : BufferedContainer
|
|
|
|
|
{
|
|
|
|
|
public PanelBackground(WorkingBeatmap working)
|
|
|
|
|
{
|
|
|
|
|
CacheDrawnFrameBuffer = true;
|
2019-09-04 18:38:12 +08:00
|
|
|
|
RedrawOnScale = false;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new BeatmapBackgroundSprite(working)
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
FillMode = FillMode.Fill,
|
|
|
|
|
},
|
2020-02-27 12:32:23 +08:00
|
|
|
|
new FillFlowContainer
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Depth = -1,
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2020-02-27 12:32:23 +08:00
|
|
|
|
Direction = FillDirection.Horizontal,
|
2018-04-13 17:19:50 +08:00
|
|
|
|
// This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle
|
|
|
|
|
Shear = new Vector2(0.8f, 0),
|
|
|
|
|
Alpha = 0.5f,
|
|
|
|
|
Children = new[]
|
|
|
|
|
{
|
|
|
|
|
// The left half with no gradient applied
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Colour = Color4.Black,
|
|
|
|
|
Width = 0.4f,
|
|
|
|
|
},
|
|
|
|
|
// Piecewise-linear gradient with 3 segments to make it appear smoother
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Colour = ColourInfo.GradientHorizontal(Color4.Black, new Color4(0f, 0f, 0f, 0.9f)),
|
|
|
|
|
Width = 0.05f,
|
|
|
|
|
},
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Colour = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f)),
|
|
|
|
|
Width = 0.2f,
|
|
|
|
|
},
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Colour = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0)),
|
|
|
|
|
Width = 0.05f,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class FilterableDifficultyIcon : DifficultyIcon
|
|
|
|
|
{
|
|
|
|
|
private readonly BindableBool filtered = new BindableBool();
|
|
|
|
|
|
2020-03-12 16:10:51 +08:00
|
|
|
|
public bool IsFiltered => filtered.Value;
|
|
|
|
|
|
|
|
|
|
public readonly CarouselBeatmap Item;
|
2020-02-12 12:05:26 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
public FilterableDifficultyIcon(CarouselBeatmap item)
|
|
|
|
|
: base(item.Beatmap)
|
|
|
|
|
{
|
|
|
|
|
filtered.BindTo(item.Filtered);
|
2019-02-22 16:51:39 +08:00
|
|
|
|
filtered.ValueChanged += isFiltered => Schedule(() => this.FadeTo(isFiltered.NewValue ? 0.1f : 1, 100));
|
2018-04-13 17:19:50 +08:00
|
|
|
|
filtered.TriggerChange();
|
2020-02-12 12:05:26 +08:00
|
|
|
|
|
2020-03-12 17:03:18 +08:00
|
|
|
|
Item = item;
|
2020-02-12 12:05:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override bool OnClick(ClickEvent e)
|
|
|
|
|
{
|
2020-03-12 16:55:31 +08:00
|
|
|
|
Item.State.Value = CarouselItemState.Selected;
|
2020-02-14 09:47:16 +08:00
|
|
|
|
return true;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-08-24 05:06:28 +08:00
|
|
|
|
|
|
|
|
|
public class FilterableGroupedDifficultyIcon : GroupedDifficultyIcon
|
|
|
|
|
{
|
2020-03-12 15:30:21 +08:00
|
|
|
|
public readonly List<CarouselBeatmap> Items;
|
2019-08-27 10:59:25 +08:00
|
|
|
|
|
2019-08-24 05:06:28 +08:00
|
|
|
|
public FilterableGroupedDifficultyIcon(List<CarouselBeatmap> items, RulesetInfo ruleset)
|
|
|
|
|
: base(items.Select(i => i.Beatmap).ToList(), ruleset, Color4.White)
|
2019-08-27 10:59:25 +08:00
|
|
|
|
{
|
2020-03-12 15:30:21 +08:00
|
|
|
|
Items = items;
|
2019-08-27 10:59:25 +08:00
|
|
|
|
|
|
|
|
|
foreach (var item in items)
|
|
|
|
|
item.Filtered.BindValueChanged(_ => Scheduler.AddOnce(updateFilteredDisplay));
|
|
|
|
|
|
|
|
|
|
updateFilteredDisplay();
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-12 15:30:21 +08:00
|
|
|
|
protected override bool OnClick(ClickEvent e)
|
|
|
|
|
{
|
|
|
|
|
Items.First().State.Value = CarouselItemState.Selected;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-27 10:59:25 +08:00
|
|
|
|
private void updateFilteredDisplay()
|
2019-08-24 05:06:28 +08:00
|
|
|
|
{
|
2019-08-26 19:11:24 +08:00
|
|
|
|
// for now, fade the whole group based on the ratio of hidden items.
|
2020-03-12 15:30:21 +08:00
|
|
|
|
this.FadeTo(1 - 0.9f * ((float)Items.Count(i => i.Filtered.Value) / Items.Count), 100);
|
2019-08-24 05:06:28 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|