Commit Graph

31225 Commits

Author SHA1 Message Date
00e46fdefe Add check if game is muted by MuteButton 2019-09-15 16:32:23 +02:00
0afb5c5bb0 Expose muted state from VolumeOverlay 2019-09-15 16:31:57 +02:00
72af640df7 Expose VolumeOverlay as available dependencies 2019-09-15 16:31:40 +02:00
4a10e6c44e Use ResolvedAttribute for NotificationOverlay 2019-09-15 16:11:45 +02:00
78931c8e23 Implement notification when user has track or master volume muted
This took around under a hour to implement, it has the same behavior and content from osu!stable.
A notification will show up when the user has either its master or track volume set to the minimum, clicking it will set it to the default values.
2019-09-15 15:59:46 +02:00
fedbac74e4 Wait for cursor hiding using ManualResetEventSlim (#6112)
Wait for cursor hiding using ManualResetEventSlim
2019-09-15 15:00:38 +09:00
1f67b222dc Merge pull request #6116 from EVAST9919/allow-flag-placeholder
Fix DrawableFlag not showing fallback texture if no flag is available
2019-09-15 13:03:41 +09:00
96453d8197 Remove redundant string interpolation 2019-09-15 02:46:28 +03:00
babd34470e Fix DrawableFlag returns empty texture if there's no flag avaliable for needed country 2019-09-15 02:33:21 +03:00
dd9f620c23 Fix misleading xmldoc 2019-09-15 01:28:07 +02:00
29fcab65f9 Remove superfluous csproj entries 2019-09-15 01:28:07 +02:00
86588778b1 Implement fallback decoder registration
After the preparatory introduction of LineBufferedReader, it is now
possible to introduce registration of fallback decoders that won't drop
input supplied in the first line of the file.

A fallback decoder is used when the magic in the first line of the file
does not match any of the other known decoders. In such a case,
the fallback decoder is constructed and provided a LineBufferedReader
instance. The process of matching magic only peeks the first non-empty
line, so it is available for re-reading in Decode() using ReadLine().

There can be only one fallback decoder per type; a second attempt of
registering a fallback will result in an exception to avoid bugs.

To address the issue of parsing failing on badly or non-headered files,
set the legacy decoders for Beatmaps and Storyboards as the fallbacks.

Due to non-trivial logic, several new, passing unit tests with possible
edge cases also included.
2019-09-15 01:28:07 +02:00
11eda44d34 Migrate decoding to line-buffered reader
Migrate all usages of StreamReader in the context of decoding beatmaps,
storyboards or skins to the new LineBufferedReader.
2019-09-15 01:28:07 +02:00
7b1ff38df7 Implement line-buffered reader
Add a line-buffered reader decorator operating on StreamReader
instances. The decorator has two main operations - PeekLine(), which
allows to see the next line in the stream without consuming it,
ReadLine(), which consumes and returns the next line in the stream, and
ReadToEnd() which reads all the remaining text in the stream (including
the unconsumed peeked line). Peeking line-per-line uses an internal
queue of lines that have been read ahead from the underlying stream.

The addition of the line-buffered reader is a workaround solution to
a problem with decoding. At current selecting a decoder works by
irreversibly reading the first line from the stream and looking for
a magic string that indicates the type of decoder to use.

It might however be possible for a file to be valid in format, just
missing a header. In such a case a lack of a line-buffered reader makes
it impossible to reparse the content of that first line. Introducing it
will however allow to peek the first line for magic first.

 - If magic is found in the first line, GetDecoder() will peek it and
   use it to return the correct Decoder instance. Note that in the case
   of JsonBeatmapDecoder the magic is the opening JSON object brace,
   and therefore must not be consumed.

 - If magic is not found, the fallback decoder will be able to consume
   it using ReadLine() in Decode().

This commit additionally contains basic unit tests for the reader.

Suggested-by: Aergwyn <aergwyn@t-online.de>
2019-09-15 01:26:15 +02:00
8456861b8d Wait for cursor hiding using ManualResetEventSlim 2019-09-14 17:08:56 +03:00
bc2a1c91a1 Merge pull request #6106 from EVAST9919/fix-header-dropdown
Fix RankingsHeader dropdown can be clickable when not visible
2019-09-14 13:45:06 +09:00
2783ae62ef Remove useless container 2019-09-14 06:34:57 +03:00
9febeb1f3d Add black background 2019-09-14 06:32:00 +03:00
a36c808682 Use Fit FillFode 2019-09-14 06:28:59 +03:00
8ad782a82d Fix RankingsHeader dropdown can be clickable when not visible 2019-09-14 06:16:25 +03:00
9a94405b3a Fix video playback is stretched on client resize 2019-09-14 06:05:09 +03:00
ac6fffd834 Recreate beatmap video on each consumption (#6098)
Recreate beatmap video on each consumption
2019-09-14 00:23:38 +09:00
65aa7b2016 Recreate beatmap video on each consumption
Should not be shared over multiple usages
2019-09-14 00:07:06 +09:00
1b8d5decfa Add beatmap video support (#5908)
Add beatmap video support

Co-authored-by: Dean Herbert <pe@ppy.sh>
2019-09-13 23:31:34 +09:00
1583cead83 Merge pull request #6097 from peppy/catch-replay-key-trigger-correction
Change osu!catch key trigger to occur on frame before positional change
2019-09-13 23:26:07 +09:00
2cd3657b5e Merge branch 'master' into beatmap-video 2019-09-13 23:08:57 +09:00
624e5644a4 Change osu!catch key trigger to occur on frame before positional change 2019-09-13 23:06:35 +09:00
e536d97255 Merge pull request #6032 from peppy/fix-catch-rewind
Fix osu!catch rewind handling
2019-09-13 23:00:33 +09:00
82561aa44a Fix catcher additive sprite rewinding and remove unnecessary update code 2019-09-13 22:44:40 +09:00
efadbefc3b Merge remote-tracking branch 'upstream/master' into fix-catch-rewind 2019-09-13 22:23:28 +09:00
9e53c091a3 Merge pull request #6095 from peppy/fix-test-dummy-api
Fix incorrect DI usage of IAPIProvider in many tests
2019-09-13 22:22:07 +09:00
2379b665e3 Use InvalidOperationException 2019-09-13 22:15:11 +09:00
d385c35955 Apply suggestions from code review
Co-Authored-By: Salman Ahmed <slmanarendo1950@gmail.com>
2019-09-13 21:55:45 +09:00
744085fa54 Fix exploding fruit not getting correct lifetime 2019-09-13 20:25:08 +09:00
9e742839ac Use correct database migration 2019-09-13 13:57:55 +03:00
8ba12fc91f Merge remote-tracking branch 'upstream/master' into fix-catch-rewind 2019-09-13 19:49:36 +09:00
fb9b25b786 Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap-video 2019-09-13 13:48:14 +03:00
b10ce0b12d Merge branch 'master' into key-counter-fixes 2019-09-13 19:43:33 +09:00
c13950fbbf Remove custom db additions 2019-09-13 13:43:21 +03:00
2e86185ccc Merge pull request #6086 from peppy/improve-catch-replay-frames
Improve how osu!catch stores and replays key actions
2019-09-13 19:43:16 +09:00
437e121056 Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap-video 2019-09-13 13:39:58 +03:00
a6420def99 Make hyperdash test automatic 2019-09-13 19:29:49 +09:00
125b3fda6c Merge branch 'master' into improve-catch-replay-frames 2019-09-13 19:23:15 +09:00
1b9ef6a8e7 Merge branch 'master' into fix-catch-rewind 2019-09-13 19:10:11 +09:00
e1ed5dfa7d Reset DrawableHitObject lifetimes on state change (#6028)
Reset DrawableHitObject lifetimes on state change

Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
2019-09-13 19:10:02 +09:00
5c2c055614 Set lifetime on initial state update 2019-09-13 18:49:21 +09:00
ceee132345 Implement RankingsHeader component for rankings overlay (#6082)
Implement RankingsHeader component for rankings overlay

Co-authored-by: Dean Herbert <pe@ppy.sh>
2019-09-13 18:23:31 +09:00
614e68cdf9 Remove redundant BindTarget usage 2019-09-13 18:11:17 +09:00
031f0ee1e7 Consume ValueChanged and inline some pointless constants 2019-09-13 18:09:15 +09:00
1e4f3507ed Fix layout not matching web 2019-09-13 18:07:52 +09:00