-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from PercyDan54/bugfix
一些修复
- Loading branch information
Showing
17 changed files
with
230 additions
and
243 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
70 changes: 35 additions & 35 deletions
70
...ure/Player/Misc/BeatmapMetataExtension.cs → ...e/Player/Misc/BeatmapMetadataExtension.cs
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,35 +1,35 @@ | ||
// 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 osu.Framework.Localisation; | ||
using osu.Game.Beatmaps; | ||
|
||
namespace osu.Game.Rulesets.IGPlayer.Feature.Player.Misc | ||
{ | ||
public static class BeatmapMetataExtension | ||
{ | ||
public static RomanisableString GetTitleRomanisable(this BeatmapMetadata metadata) | ||
{ | ||
return new RomanisableString(metadata.TitleUnicode, metadata.Title); | ||
} | ||
|
||
public static RomanisableString GetArtistRomanisable(this BeatmapMetadata metadata) | ||
{ | ||
return new RomanisableString(metadata.ArtistUnicode, metadata.Artist); | ||
} | ||
|
||
public static string GetTitle(this BeatmapMetadata metadata) | ||
{ | ||
return string.IsNullOrEmpty(metadata.TitleUnicode) | ||
? metadata.Title | ||
: metadata.TitleUnicode; | ||
} | ||
|
||
public static string GetArtist(this BeatmapMetadata metadata) | ||
{ | ||
return string.IsNullOrEmpty(metadata.ArtistUnicode) | ||
? metadata.Artist | ||
: metadata.ArtistUnicode; | ||
} | ||
} | ||
} | ||
// 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 osu.Framework.Localisation; | ||
using osu.Game.Beatmaps; | ||
|
||
namespace osu.Game.Rulesets.IGPlayer.Feature.Player.Misc | ||
{ | ||
public static class BeatmapMetadataExtension | ||
{ | ||
public static RomanisableString GetTitleRomanisable(this BeatmapMetadata metadata) | ||
{ | ||
return new RomanisableString(metadata.TitleUnicode, metadata.Title); | ||
} | ||
|
||
public static RomanisableString GetArtistRomanisable(this BeatmapMetadata metadata) | ||
{ | ||
return new RomanisableString(metadata.ArtistUnicode, metadata.Artist); | ||
} | ||
|
||
public static (string Title, bool IsUnicode) GetTitle(this BeatmapMetadata metadata) | ||
{ | ||
return string.IsNullOrEmpty(metadata.TitleUnicode) | ||
? (metadata.Title, false) | ||
: (metadata.TitleUnicode, true); | ||
} | ||
|
||
public static string GetArtist(this BeatmapMetadata metadata) | ||
{ | ||
return string.IsNullOrEmpty(metadata.ArtistUnicode) | ||
? metadata.Artist | ||
: metadata.ArtistUnicode; | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.