-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Populate metadata from ID3 tags when changing beatmap audio track in …
…editor - Closes ppy#21189 - Supersedes / closes ppy/osu-framework#5627 - Supersedes / closes ppy#22235 The reason why I opted for a complete rewrite rather than a revival of that aforementioned pull series is that it always felt quite gross to me to be pulling framework's audio subsystem into the task of reading ID3 tags, and I also partially don't believe that BASS is *good* at reading ID3 tags. Meanwhile, we already have another library pulled in that is *explicitly* intended for reading multimedia metadata, and using it does not require framework changes. (And it was pulled in explicitly for use in the editor verify tab as well.) The hard and dumb part of this diff is hacking the gibson such that the metadata section on setup screen actually *updates itself* after the resources section is done doing its thing. After significant gnashing of teeth I just did the bare minimum to make work by caching a common parent and exposing an `Action?` on it. If anyone has better ideas, I'm all ears.
- Loading branch information
Showing
3 changed files
with
67 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using System.Linq; | ||
using osu.Framework.Allocation; | ||
using osu.Framework.Graphics; | ||
|
@@ -13,12 +14,15 @@ | |
|
||
namespace osu.Game.Screens.Edit.Setup | ||
{ | ||
[Cached] | ||
public partial class SetupScreen : EditorScreen | ||
{ | ||
public const float COLUMN_WIDTH = 450; | ||
public const float SPACING = 28; | ||
public const float MAX_WIDTH = 2 * COLUMN_WIDTH + SPACING; | ||
|
||
public Action? MetadataChanged { get; set; } | ||
|
||
public SetupScreen() | ||
: base(EditorScreenMode.SongSetup) | ||
{ | ||
|