mirror of
https://github.com/ppy/osu
synced 2024-12-16 11:56:31 +00:00
Merge branch 'master' into use-transform-managment-for-mania-ruleset
This commit is contained in:
commit
ba969d2d7d
@ -58,14 +58,12 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
ApplyResult(r => r.Type = CheckPosition.Invoke(HitObject) ? HitResult.Perfect : HitResult.Miss);
|
||||
}
|
||||
|
||||
protected override bool UseTransformStateManagement => false;
|
||||
protected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;
|
||||
|
||||
protected override void UpdateState(ArmedState state)
|
||||
protected override void UpdateInitialTransforms() => this.FadeIn(200);
|
||||
|
||||
protected override void UpdateStateTransforms(ArmedState state)
|
||||
{
|
||||
// TODO: update to use new state management.
|
||||
using (BeginAbsoluteSequence(HitObject.StartTime - HitObject.TimePreempt))
|
||||
this.FadeIn(200);
|
||||
|
||||
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||
|
||||
using (BeginAbsoluteSequence(endTime, true))
|
||||
|
@ -53,7 +53,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
if (lastPlateableFruit == null)
|
||||
return;
|
||||
|
||||
// this is required to make this run after the last caught fruit runs UpdateState at least once.
|
||||
// this is required to make this run after the last caught fruit runs updateState() at least once.
|
||||
// TODO: find a better alternative
|
||||
if (lastPlateableFruit.IsLoaded)
|
||||
action();
|
||||
|
@ -220,14 +220,23 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
public class FilterableGroupedDifficultyIcon : GroupedDifficultyIcon
|
||||
{
|
||||
private readonly List<CarouselBeatmap> items;
|
||||
|
||||
public FilterableGroupedDifficultyIcon(List<CarouselBeatmap> items, RulesetInfo ruleset)
|
||||
: base(items.Select(i => i.Beatmap).ToList(), ruleset, Color4.White)
|
||||
{
|
||||
items.ForEach(item => item.Filtered.ValueChanged += _ =>
|
||||
{
|
||||
// for now, fade the whole group based on the ratio of hidden items.
|
||||
this.FadeTo(1 - 0.9f * ((float)items.Count(i => i.Filtered.Value) / items.Count), 100);
|
||||
});
|
||||
this.items = items;
|
||||
|
||||
foreach (var item in items)
|
||||
item.Filtered.BindValueChanged(_ => Scheduler.AddOnce(updateFilteredDisplay));
|
||||
|
||||
updateFilteredDisplay();
|
||||
}
|
||||
|
||||
private void updateFilteredDisplay()
|
||||
{
|
||||
// for now, fade the whole group based on the ratio of hidden items.
|
||||
this.FadeTo(1 - 0.9f * ((float)items.Count(i => i.Filtered.Value) / items.Count), 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user