Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite BeatmapCarousel with ModelView implementation #1697

Merged
merged 53 commits into from Dec 18, 2017

Conversation

peppy
Copy link
Sponsor Member

@peppy peppy commented Dec 14, 2017

The old one was horrible, so I rewrote it with better and tests.

protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent) => dependencies = new DependencyContainer(parent);

[BackgroundDependencyLoader]
private void load()
private void load(BeatmapManager baseMaanger)

This comment was marked as off-topic.

@peppy peppy force-pushed the song-select-state-simplification branch 2 times, most recently from 756532c to b34e063 Compare December 14, 2017 12:02
@peppy peppy force-pushed the song-select-state-simplification branch from bbd1125 to 04304c2 Compare December 15, 2017 05:58
@peppy peppy force-pushed the song-select-state-simplification branch from 04304c2 to fd9d900 Compare December 15, 2017 09:40
@peppy peppy force-pushed the song-select-state-simplification branch from 82a6784 to a8a2c23 Compare December 15, 2017 15:33
@smoogipoo
Copy link
Contributor

[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Sequence contains no elements
  at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0000b] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/First.cs:18 
  at osu.Game.Screens.Select.BeatmapCarousel.SelectNext (System.Int32 direction, System.Boolean skipDifficulties) [0x00011] in /Users/smoogipoo/Repos/Temp/temp-osu/osu.Game/Screens/Select/BeatmapCarousel.cs:180 
  at osu.Game.Screens.Select.BeatmapCarousel.OnKeyDown (osu.Framework.Input.InputState state, osu.Framework.Input.KeyDownEventArgs args) [0x0004f] in /Users/smoogipoo/Repos/Temp/temp-osu/osu.Game/Screens/Select/BeatmapCarousel.cs:463 
  at osu.Framework.Graphics.Drawable.TriggerOnKeyDown (osu.Framework.Input.InputState screenSpaceState, osu.Framework.Input.KeyDownEventArgs args) [0x00000] in /Users/smoogipoo/Repos/Temp/temp-osu/osu-framework/osu.Framework/Graphics/Drawable.cs:1802 
  at osu.Framework.Input.InputManager+<>c__DisplayClass62_0.<PropagateKeyDown>b__0 (osu.Framework.Graphics.Drawable target) [0x00000] in /Users/smoogipoo/Repos/Temp/temp-osu/osu-framework/osu.Framework/Input/InputManager.cs:688 
  at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate, System.Boolean& found) [0x0003f] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/First.cs:107 
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/First.cs:46 
  at osu.Framework.Input.InputManager.PropagateKeyDown (System.Collections.Generic.IEnumerable`1[T] drawables, osu.Framework.Input.InputState state, osu.Framework.Input.KeyDownEventArgs args) [0x00015] in /Users/smoogipoo/Repos/Temp/temp-osu/osu-framework/osu.Framework/Input/InputManager.cs:688 
  at osu.Framework.Input.InputManager.handleKeyDown (osu.Framework.Input.InputState state, OpenTK.Input.Key key, System.Boolean repeat) [0x0002b] in /Users/smoogipoo/Repos/Temp/temp-osu/osu-framework/osu.Framework/Input/InputManager.cs:676 

@smoogipoo
Copy link
Contributor

954bc77#diff-17cb1f4d2c61ec9f4581df7ddae8f3adL63 Unused variable (why does resharper not pick up on this?).

@peppy peppy changed the title BeatmapCarousel revamp Rewrite BeatmapCarousel with ModelView implementation Dec 18, 2017

public IReadOnlyList<CarouselItem> Children => InternalChildren;

protected List<CarouselItem> InternalChildren { get; set; }

This comment was marked as off-topic.


protected virtual void ChildItemStateChanged(CarouselItem item, CarouselItemState value)
{
// todo: check state of selected item.

This comment was marked as off-topic.

@smoogipoo
Copy link
Contributor

I'm happy to get this merged in for now. I don't see anything obviously wrong with this for now, besides the jiggling due to the removal of the animation skipping. We can fix up any further issues later.

👍

@smoogipoo smoogipoo merged commit dd5e082 into ppy:master Dec 18, 2017
@peppy peppy deleted the song-select-state-simplification branch January 11, 2018 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants