Skip to content

Commit

Permalink
Merge pull request #63 from Milkitic/develop
Browse files Browse the repository at this point in the history
some fixes
  • Loading branch information
Milkitic committed Nov 22, 2020
2 parents e630bc9 + 05eccb1 commit 2d2f1cb
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 8 deletions.
2 changes: 1 addition & 1 deletion OsuPlayer.Media.Audio/ObservablePlayController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ private async Task<bool> LoadAsync(bool isReading, bool playInstantly)
Execute.OnUiThread(() => MetaLoaded?.Invoke(context, _cts.Token));

// background
var defaultPath = Path.Combine(Domain.ResourcePath, "default.jpg");
var defaultPath = Path.Combine(Domain.ResourcePath, "official", "registration.jpg");

if (osuFile.Events.BackgroundInfo != null)
{
Expand Down
10 changes: 7 additions & 3 deletions OsuPlayer.Wpf/OsuPlayer.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,12 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="Resources\official\registration.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\official\LICENCE.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Resource Include="Resources\icon.png" />
<Resource Include="Resources\Fonts\SourceHanSerifCn.ttf" />
<Resource Include="Resources\Fonts\SourceSansPro-Black.ttf" />
Expand Down Expand Up @@ -719,9 +725,7 @@
<Resource Include="Resources\fullscreen_s.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\default.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Resources\default.jpg" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\title.png" />
Expand Down
163 changes: 163 additions & 0 deletions OsuPlayer.Wpf/Resources/official/LICENCE.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions OsuPlayer.Wpf/UserControls/AnimationControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private void UserControl_Initialized(object sender, EventArgs e)
{
_viewModel = (AnimationControlVm)DataContext;

var path = Path.Combine(Domain.ResourcePath, "default.jpg");
var path = Path.Combine(Domain.ResourcePath, "official", "registration.jpg");
if (File.Exists(path))
{
BackImage.Source = new BitmapImage(new Uri(path));
Expand Down Expand Up @@ -212,7 +212,7 @@ private async Task CloseVideoAsync()
_beatmapCtx.SetTimeHandle = async (time, play) =>
await _controller.Player.SkipTo(TimeSpan.FromMilliseconds(time)).ConfigureAwait(false);
}

Execute.OnUiThread(() =>
{
VideoElementBorder.Visibility = Visibility.Hidden;
Expand Down Expand Up @@ -315,7 +315,7 @@ async void OnVideoElementOnSeekingEnded(object sender, EventArgs e)
}
};
}

private async void OnMediaOpened(object sender, MediaOpenedEventArgs e)
{
VideoElementBorder.Visibility = Visibility.Visible;
Expand Down
10 changes: 9 additions & 1 deletion OsuPlayer.Wpf/UserControls/WelcomeControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public ICommand SelectDbCommand
return;
}
bool isSuccess = false;
try
{
GuideSyncing = true;
Expand All @@ -62,6 +63,7 @@ public ICommand SelectDbCommand
AppSettings.SaveDefault();
GuideSyncing = false;
GuideSelectedDb = true;
isSuccess = true;
}
catch (Exception ex)
{
Expand All @@ -70,7 +72,13 @@ public ICommand SelectDbCommand
GuideSelectedDb = false;
}
SkipCommand.Execute(null);
if (isSuccess)
{
AppSettings.Default.General.FirstOpen = false;
AppSettings.SaveDefault();
FrontDialogOverlay.Default.RaiseOk();
}
GuideSyncing = false;
});
}
Expand Down
3 changes: 3 additions & 0 deletions OsuPlayer.Wpf/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ private async void Window_Loaded(object sender, RoutedEventArgs e)
Width = 350,
ShowDialogButtons = false,
ShowTitleBar = false
}, (obj, args) =>
{
SwitchSearch.IsChecked = true;
});
//WelcomeControl.Show();
//try
Expand Down

0 comments on commit 2d2f1cb

Please sign in to comment.