-
Notifications
You must be signed in to change notification settings - Fork 30
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 #59 from Milkitic/develop
develop2master
- Loading branch information
Showing
37 changed files
with
837 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
[submodule "Libraries/OSharp.Storyboard"] | ||
path = Libraries/OSharp.Storyboard | ||
url = https://github.com/Milkitic/OSharp.Storyboard | ||
branch = master | ||
[submodule "Libraries/OSharp.Common"] | ||
path = Libraries/OSharp.Common | ||
url = https://github.com/Milkitic/OSharp.Common | ||
branch = master | ||
[submodule "Libraries/OSharp.Beatmap"] | ||
path = Libraries/OSharp.Beatmap | ||
url = https://github.com/Milkitic/OSharp.Beatmap | ||
url = https://github.com/Milkitic/OSharp.Beatmap | ||
branch = master |
Submodule OSharp.Beatmap
updated
from a810ae to d6d67e
Submodule OSharp.Storyboard
updated
from 1e1dcd to 9d7155
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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Windows.Data; | ||
using System.Windows.Markup; | ||
using System.Windows.Media; | ||
|
||
namespace Milky.OsuPlayer.Converters | ||
{ | ||
public class LocalizedFontFamilyConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
if (value is FontFamily fontFamily) | ||
{ | ||
var languageSpecificStringDictionary = fontFamily.FamilyNames; | ||
if (languageSpecificStringDictionary.TryGetValue( | ||
XmlLanguage.GetLanguage(CultureInfo.CurrentUICulture.Name), out var fontName)) | ||
{ | ||
return fontName; | ||
} | ||
else if (languageSpecificStringDictionary.Count > 1) | ||
{ | ||
var name = languageSpecificStringDictionary.FirstOrDefault(k => | ||
k.Key != XmlLanguage.GetLanguage("en-us")).Value; | ||
return name; | ||
} | ||
else | ||
{ | ||
return languageSpecificStringDictionary.FirstOrDefault().Value; | ||
} | ||
} | ||
|
||
throw new ArgumentNullException(nameof(fontFamily)); | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Windows.Data; | ||
|
||
namespace Milky.OsuPlayer.Converters | ||
{ | ||
public class RoundedNumberConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
var d = System.Convert.ToDouble(value); | ||
return Math.Round(d, 3); | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
var d = System.Convert.ToDouble(value); | ||
return d; | ||
} | ||
} | ||
} |
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
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
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.