Commit Graph

317 Commits

Author SHA1 Message Date
897f593b37 Fix beatmap carousel panels getting masked away when out of scroll bounds
Regressed in https://github.com/ppy/osu/pull/10973 due to removed masking specification.

Closes #11067.
2020-12-03 13:26:28 +09:00
792934f2c4 Allow scroll type to be specified
This brings back the ability for the carousel to scroll in a classic
way. It turns out this is generally what we want for "seek" operations
like "random", else it's quite hard to get the expected animation.

I did experiment with applying the animation after the pooled panels are
retrieved, but in a best-case scenario there is still a gap where no
panels are displayed during the random seek operation.
2020-11-27 13:54:38 +09:00
0a48dd8f76 Delegate scroll animation to panels themselves 2020-11-26 18:42:51 +09:00
ad258e2e52 Update scroll position before applying any panel animations
In the case of automatic scroll requirements (ie. scroll to selected) we
are delegating the animation logic to the panels themselves. In order to
make this work correctly, the scroll operation needs to take effect
before any animation updates are run.
2020-11-26 18:33:41 +09:00
6058c66edb Move drawable carousel set movement logic into panels themselves 2020-11-26 18:32:43 +09:00
f8db7a9902 Remove ScrollableContent container from carousel
This was causing multiple issues with masking and sizing and really
didn't need to exist in the first place. Also not sure why the pool was
nested inside the scroll container, but it isn't any more. Probably for
the best.
2020-11-26 18:28:54 +09:00
d5940193a2 Ensure visible items is greater than zero before trying to display a range 2020-10-19 19:55:20 +09:00
9106e97c37 Ensure max value in clamp is at least zero 2020-10-19 19:10:01 +09:00
1c2185e969 Replace comment with link to issue 2020-10-19 18:41:28 +09:00
044622a7a6 Fix out of bounds issues 2020-10-19 18:41:17 +09:00
bff3856c83 Account for panel height when removing as off-screen 2020-10-19 13:13:32 +09:00
ee0efa0b4c Fix off-by-one in display range retrieval logic 2020-10-19 13:05:42 +09:00
4590d9b93b Remove outdated comment logic 2020-10-19 13:04:12 +09:00
5d11db7753 Locallise ChildItems to DrawableCarouselBeatmapSet for clarity 2020-10-13 19:31:29 +09:00
8eca28e8bc Add comment about off-screen loading 2020-10-13 19:10:35 +09:00
a1801f8ae4 Unmark todo for now 2020-10-13 18:47:36 +09:00
40a0ab7aaa Avoid allocating CarouselItems for bounds checks 2020-10-13 18:33:31 +09:00
83358d487f Remove logging 2020-10-13 18:18:22 +09:00
69650c16fc Simplify vertical position calculations by including spacing in height definition 2020-10-13 18:13:36 +09:00
f3b937e358 Fix masking issues with certain aspect ratio displays 2020-10-13 17:37:33 +09:00
1f0aa974dd Fix failing tests 2020-10-13 17:37:33 +09:00
cfec4f4fc1 Extract header element from base DrawableCarouselItem class 2020-10-13 17:37:33 +09:00
2aad482545 Fix x offsets of difficulties not being updated 2020-10-13 17:37:33 +09:00
1b7e3397c6 Use expiry to avoid ToArray 2020-10-13 17:37:33 +09:00
075bf23714 Better track off-screen drawables (and return to pool less often) 2020-10-13 17:37:33 +09:00
29983afcef Replace pool/cleanup logic with simplest form possible
This will temporarily break panels that go off-screen, as they will
disappear immediately
2020-10-13 17:37:33 +09:00
06e84c8eb3 Add comments and split out update steps into a more logical flow 2020-10-13 17:37:33 +09:00
20b54fb904 Move transform clean-up to pooling free call 2020-10-13 17:37:33 +09:00
f6aa448523 Store y positions inside items rather than in a separate array 2020-10-13 17:37:33 +09:00
b92c22ad42 Add logging 2020-10-13 17:37:33 +09:00
fd8654cff3 Add back difficulty panel spacing 2020-10-13 17:37:33 +09:00
ce67f65084 Fix single results not showing up 2020-10-13 17:37:33 +09:00
220c8ba2c4 Fix incorrect vertical offsets when difficulties are filtered away 2020-10-13 17:37:33 +09:00
8847cedf29 Add initial pass of vertical transforms 2020-10-13 17:37:33 +09:00
15325f5f51 Base bounds checks on +1 (to avoid worrying about current item heights) 2020-10-13 17:37:33 +09:00
bb03c5d77c Temporarily disable masking temporarily to fix panels disappearing at extents 2020-10-13 17:37:33 +09:00
c5a6f4b453 Fix scroll to selected beatmap 2020-10-13 17:37:33 +09:00
5c2f134665 Add back left offset for selected set 2020-10-13 17:37:33 +09:00
ca1f5dcada Add back panel padding 2020-10-13 17:37:33 +09:00
0400b34349 Load more components asynchronously after pool resolution 2020-10-13 17:37:33 +09:00
f3b24b9bb5 Avoid performing eager selection constantly on adding ranges of new children 2020-10-13 17:37:33 +09:00
0a978c6131 Add basic pooling setup 2020-10-13 17:37:33 +09:00
f17d661c1a Add basic range-based invalidation 2020-10-13 17:37:33 +09:00
3143224e5b Refactor how drawable carousel items are constructed 2020-10-13 17:37:33 +09:00
0718e9e4b6 Update outdated comment 2020-07-13 13:08:41 +09:00
ab11a112b7 Fix correct filter criteria not being applied to beatmap carousel if beatmaps take too long to load 2020-07-12 22:33:41 +09:00
099416b4c3 Move check inside next difficulty selection 2020-06-26 21:03:34 +09:00
8f6d52550f Fix potential exception if button is pressed before selection 2020-06-26 20:32:13 +09:00
1b4c31a84f Remove double schedule 2020-06-26 20:14:08 +09:00
e3d654d33f Cleanup 2020-06-26 20:14:02 +09:00