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

3 participants
@peppy
Member

peppy commented Dec 14, 2017

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

peppy added some commits Dec 12, 2017

Fix random and add tests
Also exposes SelectedBeatmapSet.
Add support for adding/removing items
Tests accompany of course
Ensure correct selection after deletion of currently selected
Also fixes a lot of bad interactions and simplifies further.
@smoogipoo

This comment has been minimized.

Show comment
Hide comment
@smoogipoo

smoogipoo Dec 18, 2017

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 
Contributor

smoogipoo commented Dec 18, 2017

[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

This comment has been minimized.

Show comment
Hide comment
@smoogipoo

smoogipoo Dec 18, 2017

Contributor

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

Contributor

smoogipoo commented Dec 18, 2017

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

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

@smoogipoo

This comment has been minimized.

Show comment
Hide comment
@smoogipoo

smoogipoo Dec 18, 2017

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.

👍

Contributor

smoogipoo commented Dec 18, 2017

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

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@peppy peppy deleted the peppy:song-select-state-simplification branch Jan 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment