From 1e78bc749514210d83339916bad01643e438e176 Mon Sep 17 00:00:00 2001 From: Raphael Winkler Date: Wed, 15 Aug 2018 07:00:03 +0200 Subject: [PATCH] Fixed skin creation dialog and language selection --- Osmo/Converters/EnumToIntConverter.cs | 3 ++- Osmo/Core/AudioEngine.cs | 2 ++ Osmo/Localisation/StringResources.es.xaml | 13 +++++++++++++ Osmo/MainWindow.xaml | 3 --- Osmo/MainWindow.xaml.cs | 2 -- Osmo/Properties/AssemblyInfo.cs | 4 ++-- Osmo/UI/NewSkinDialog.xaml.cs | 11 ----------- Osmo/UI/Settings.xaml | 6 ++++-- Osmo/UI/SkinSelect.xaml | 2 +- Osmo/UI/SkinSelect.xaml.cs | 1 + Osmo/ViewModel/SettingsViewModel.cs | 6 +++--- 11 files changed, 28 insertions(+), 25 deletions(-) diff --git a/Osmo/Converters/EnumToIntConverter.cs b/Osmo/Converters/EnumToIntConverter.cs index b4817b1..38700ed 100644 --- a/Osmo/Converters/EnumToIntConverter.cs +++ b/Osmo/Converters/EnumToIntConverter.cs @@ -13,7 +13,8 @@ class EnumToIntConverter : IValueConverter public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var underlyingType = Enum.GetUnderlyingType(value.GetType()); - return System.Convert.ChangeType(value, underlyingType); + int test = (int)System.Convert.ChangeType(value, underlyingType); + return (int)System.Convert.ChangeType(value, underlyingType); } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) diff --git a/Osmo/Core/AudioEngine.cs b/Osmo/Core/AudioEngine.cs index 5084218..6c762a2 100644 --- a/Osmo/Core/AudioEngine.cs +++ b/Osmo/Core/AudioEngine.cs @@ -10,6 +10,8 @@ namespace Osmo.Core { class AudioEngine { + private static AudioEngine instance; + private int _stream; private BASSTimer _timer; private bool paused; diff --git a/Osmo/Localisation/StringResources.es.xaml b/Osmo/Localisation/StringResources.es.xaml index 80ee8d3..9f26e9d 100644 --- a/Osmo/Localisation/StringResources.es.xaml +++ b/Osmo/Localisation/StringResources.es.xaml @@ -38,6 +38,7 @@ _SÍ _NO _IMPORTAR + _RETRY _CARGAR PLANTILLA _NUEVA PLANTILLA _CARGAR SKIN @@ -148,6 +149,13 @@ Editor Keyboard shortcuts Cheat sheet + osu! is not installed! + Should osu! be installed make sure it has been installed correctly, otherwise select it manually. + Auto-detect osu! folder + Do you wish for Osmo to find your osu! installation folder? + Auto-detect failed! + Are you sure you have osu! installed correctly? + You have unsaved changes to your settings! Do you want to save them first? (Selecting No reverts all changes to your settings) Archivo skin ejecutable @@ -168,6 +176,7 @@ ¿Eliminar skin? ¿Seguro que desea eliminar este skin? Seleccione el directorio al que desea exportar su skin + Loading skins... Width @@ -205,6 +214,10 @@ ¡Osmo es de código abierto! Haga clic aquí para ir al repositorio de GitHub. + Session id: + The session id is used inside your log files. This is especially useful if you have multiple instances of Osmo open and one of them crashes or generates errors. + Copy the session id to your clipboard. + Session id copied to clipboard! Crear una nueva plantilla diff --git a/Osmo/MainWindow.xaml b/Osmo/MainWindow.xaml index 4efc5c9..b288580 100644 --- a/Osmo/MainWindow.xaml +++ b/Osmo/MainWindow.xaml @@ -35,9 +35,6 @@ - - - diff --git a/Osmo/MainWindow.xaml.cs b/Osmo/MainWindow.xaml.cs index 198fa8f..a7793fc 100644 --- a/Osmo/MainWindow.xaml.cs +++ b/Osmo/MainWindow.xaml.cs @@ -102,8 +102,6 @@ private void sidebarMenu_Loaded(object sender, RoutedEventArgs e) { if (!configuration.IsValid) sidebarMenu.SelectedIndex = FixedValues.CONFIG_INDEX; - - dialg_newSkin.SetMasterViewModel(DataContext as OsmoViewModel); } private async void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) diff --git a/Osmo/Properties/AssemblyInfo.cs b/Osmo/Properties/AssemblyInfo.cs index 27532fc..08ba767 100644 --- a/Osmo/Properties/AssemblyInfo.cs +++ b/Osmo/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.0.3.94")] -[assembly: AssemblyFileVersion("0.0.3.94")] +[assembly: AssemblyVersion("0.0.3.96")] +[assembly: AssemblyFileVersion("0.0.3.96")] diff --git a/Osmo/UI/NewSkinDialog.xaml.cs b/Osmo/UI/NewSkinDialog.xaml.cs index 377fc4b..11961ac 100644 --- a/Osmo/UI/NewSkinDialog.xaml.cs +++ b/Osmo/UI/NewSkinDialog.xaml.cs @@ -1,20 +1,9 @@ using MaterialDesignThemes.Wpf; using Osmo.Core; using Osmo.ViewModel; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; namespace Osmo.UI { diff --git a/Osmo/UI/Settings.xaml b/Osmo/UI/Settings.xaml index fd8cea2..c4a6e06 100644 --- a/Osmo/UI/Settings.xaml +++ b/Osmo/UI/Settings.xaml @@ -20,6 +20,7 @@ + @@ -117,7 +118,7 @@ Foreground="{Binding ElementName=combo_language, Path=BorderBrush}" Kind="Flag" /> + SelectedIndex="{Binding Language}" Style="{StaticResource MaterialDesignFloatingHintComboBox}"> @@ -165,6 +166,7 @@