mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09:00
Merge branch 'master' into fix-beatmap-info-wedge-async
This commit is contained in:
commit
b2cc7b9a5c
@ -1,6 +1,6 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="VisualTests (netcoreapp2.0)" type="DotNetProject" factoryName=".NET Project">
|
<configuration default="false" name="VisualTests (netcoreapp2.1)" type="DotNetProject" factoryName=".NET Project">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/osu.Game.Tests/bin/Debug/netcoreapp2.0/osu.Game.Tests.dll" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/osu.Game.Tests/bin/Debug/netcoreapp2.1/osu.Game.Tests.dll" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/osu.Game.Tests" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/osu.Game.Tests" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
||||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||||
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v2.0" />
|
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v2.1" />
|
||||||
<method />
|
<method />
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
@ -1,6 +1,6 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="osu! (netcoreapp2.0)" type="DotNetProject" factoryName=".NET Project">
|
<configuration default="false" name="osu! (netcoreapp2.1)" type="DotNetProject" factoryName=".NET Project">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/osu.Desktop/bin/Debug/netcoreapp2.0/osu!.dll" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/osu.Desktop/bin/Debug/netcoreapp2.1/osu!.dll" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/osu.Desktop" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/osu.Desktop" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
||||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||||
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v2.0" />
|
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v2.1" />
|
||||||
<method />
|
<method />
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
16
.vscode/launch.json
vendored
16
.vscode/launch.json
vendored
@ -58,12 +58,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Debug, netcoreapp2.0)",
|
"name": "VisualTests (Debug, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/osu.Game.Tests/bin/Debug/netcoreapp2.0/osu.Game.Tests.dll"
|
"${workspaceRoot}/osu.Game.Tests/bin/Debug/netcoreapp2.1/osu.Game.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build tests (Debug, dotnet)",
|
"preLaunchTask": "Build tests (Debug, dotnet)",
|
||||||
@ -71,12 +71,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Release, netcoreapp2.0)",
|
"name": "VisualTests (Release, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/osu.Game.Tests/bin/Release/netcoreapp2.0/osu.Game.Tests.dll"
|
"${workspaceRoot}/osu.Game.Tests/bin/Release/netcoreapp2.1/osu.Game.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build tests (Release, dotnet)",
|
"preLaunchTask": "Build tests (Release, dotnet)",
|
||||||
@ -84,12 +84,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "osu! (Debug, netcoreapp2.0)",
|
"name": "osu! (Debug, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/osu.Desktop/bin/Debug/netcoreapp2.0/osu!.dll",
|
"${workspaceRoot}/osu.Desktop/bin/Debug/netcoreapp2.1/osu!.dll",
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build osu! (Debug, dotnet)",
|
"preLaunchTask": "Build osu! (Debug, dotnet)",
|
||||||
@ -97,12 +97,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "osu! (Release, netcoreapp2.0)",
|
"name": "osu! (Release, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/osu.Desktop/bin/Release/netcoreapp2.0/osu!.dll",
|
"${workspaceRoot}/osu.Desktop/bin/Release/netcoreapp2.1/osu!.dll",
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build osu! (Release, dotnet)",
|
"preLaunchTask": "Build osu! (Release, dotnet)",
|
||||||
|
10
.vscode/tasks.json
vendored
10
.vscode/tasks.json
vendored
@ -38,7 +38,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Desktop",
|
"osu.Desktop",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
"/verbosity:m"
|
"/verbosity:m"
|
||||||
@ -54,7 +54,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Desktop",
|
"osu.Desktop",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:Configuration=Release",
|
"/p:Configuration=Release",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
@ -71,7 +71,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Tests",
|
"osu.Game.Tests",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
"/verbosity:m"
|
"/verbosity:m"
|
||||||
@ -87,7 +87,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Tests",
|
"osu.Game.Tests",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:Configuration=Release",
|
"/p:Configuration=Release",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
@ -106,7 +106,7 @@
|
|||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Restore (netcoreapp2.0)",
|
"label": "Restore (netcoreapp2.1)",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
clone_depth: 1
|
clone_depth: 1
|
||||||
version: '{branch}-{build}'
|
version: '{branch}-{build}'
|
||||||
image: Visual Studio 2017
|
image: Visual Studio 2017 preview
|
||||||
configuration: Debug
|
configuration: Debug
|
||||||
cache:
|
cache:
|
||||||
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit aebfa5bc5c634c1fd0c103e0c17518e5111a67c7
|
Subproject commit b963ce82505bc953db0a0763679e1ec80a060811
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Import Project="..\osu.Game.props" />
|
<Import Project="..\osu.Game.props" />
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<TargetFrameworks>net471;netcoreapp2.0</TargetFrameworks>
|
<TargetFrameworks>net471;netcoreapp2.1</TargetFrameworks>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
@ -20,8 +20,6 @@
|
|||||||
<StartupObject>osu.Desktop.Program</StartupObject>
|
<StartupObject>osu.Desktop.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<!-- This can be removed after .NET Core SDK version 2.1.300; see https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet -->
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.3" />
|
|
||||||
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj" />
|
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj" />
|
||||||
<ProjectReference Include="..\osu.Game\osu.Game.csproj" />
|
<ProjectReference Include="..\osu.Game\osu.Game.csproj" />
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
||||||
@ -38,8 +36,4 @@
|
|||||||
<ItemGroup Label="Resources">
|
<ItemGroup Label="Resources">
|
||||||
<EmbeddedResource Include="lazer.ico" />
|
<EmbeddedResource Include="lazer.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<!-- This can be removed after .NET Core SDK version 2.1.300; see https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet -->
|
|
||||||
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"type": "mono",
|
"type": "mono",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceRoot}/bin/Debug/net471/osu.Game.Rulesets.Catch.Tests.exe",
|
"program": "${workspaceRoot}/bin/Release/net471/osu.Game.Rulesets.Catch.Tests.exe",
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Release, msbuild)",
|
"preLaunchTask": "Build (Release, msbuild)",
|
||||||
"runtimeExecutable": null,
|
"runtimeExecutable": null,
|
||||||
@ -30,12 +30,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Debug, netcoreapp2.0)",
|
"name": "VisualTests (Debug, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/bin/Debug/netcoreapp2.0/osu.Game.Rulesets.Catch.Tests.dll"
|
"${workspaceRoot}/bin/Debug/netcoreapp2.1/osu.Game.Rulesets.Catch.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Debug, dotnet)",
|
"preLaunchTask": "Build (Debug, dotnet)",
|
||||||
@ -43,12 +43,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Release, netcoreapp2.0)",
|
"name": "VisualTests (Release, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/bin/Debug/netcoreapp2.0/osu.Game.Rulesets.Catch.Tests.dll"
|
"${workspaceRoot}/bin/Release/netcoreapp2.1/osu.Game.Rulesets.Catch.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Release, dotnet)",
|
"preLaunchTask": "Build (Release, dotnet)",
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Rulesets.Catch.Tests.csproj",
|
"osu.Game.Rulesets.Catch.Tests.csproj",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
"/verbosity:m"
|
"/verbosity:m"
|
||||||
@ -56,7 +56,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Rulesets.Catch.Tests.csproj",
|
"osu.Game.Rulesets.Catch.Tests.csproj",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:Configuration=Release",
|
"/p:Configuration=Release",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
@ -75,7 +75,7 @@
|
|||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Restore (netcoreapp2.0)",
|
"label": "Restore (netcoreapp2.1)",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<Import Project="..\osu.TestProject.props" />
|
<Import Project="..\osu.TestProject.props" />
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFrameworks>netcoreapp2.0;net471</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1;net471</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj" />
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"type": "mono",
|
"type": "mono",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceRoot}/bin/Debug/net471/osu.Game.Rulesets.Mania.Tests.exe",
|
"program": "${workspaceRoot}/bin/Release/net471/osu.Game.Rulesets.Mania.Tests.exe",
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Release, msbuild)",
|
"preLaunchTask": "Build (Release, msbuild)",
|
||||||
"runtimeExecutable": null,
|
"runtimeExecutable": null,
|
||||||
@ -30,12 +30,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Debug, netcoreapp2.0)",
|
"name": "VisualTests (Debug, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/bin/Debug/netcoreapp2.0/osu.Game.Rulesets.Mania.Tests.dll"
|
"${workspaceRoot}/bin/Debug/netcoreapp2.1/osu.Game.Rulesets.Mania.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Debug, dotnet)",
|
"preLaunchTask": "Build (Debug, dotnet)",
|
||||||
@ -43,12 +43,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Release, netcoreapp2.0)",
|
"name": "VisualTests (Release, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/bin/Debug/netcoreapp2.0/osu.Game.Rulesets.Mania.Tests.dll"
|
"${workspaceRoot}/bin/Release/netcoreapp2.1/osu.Game.Rulesets.Mania.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Release, dotnet)",
|
"preLaunchTask": "Build (Release, dotnet)",
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Rulesets.Mania.Tests.csproj",
|
"osu.Game.Rulesets.Mania.Tests.csproj",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
"/verbosity:m"
|
"/verbosity:m"
|
||||||
@ -56,7 +56,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Rulesets.Mania.Tests.csproj",
|
"osu.Game.Rulesets.Mania.Tests.csproj",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:Configuration=Release",
|
"/p:Configuration=Release",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
@ -75,7 +75,7 @@
|
|||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Restore (netcoreapp2.0)",
|
"label": "Restore (netcoreapp2.1)",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<Import Project="..\osu.TestProject.props" />
|
<Import Project="..\osu.TestProject.props" />
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFrameworks>netcoreapp2.0;net471</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1;net471</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj" />
|
||||||
|
10
osu.Game.Rulesets.Osu.Tests/.vscode/launch.json
vendored
10
osu.Game.Rulesets.Osu.Tests/.vscode/launch.json
vendored
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"type": "mono",
|
"type": "mono",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceRoot}/bin/Debug/net471/osu.Game.Rulesets.Osu.Tests.exe",
|
"program": "${workspaceRoot}/bin/Release/net471/osu.Game.Rulesets.Osu.Tests.exe",
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Release, msbuild)",
|
"preLaunchTask": "Build (Release, msbuild)",
|
||||||
"runtimeExecutable": null,
|
"runtimeExecutable": null,
|
||||||
@ -30,12 +30,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Debug, netcoreapp2.0)",
|
"name": "VisualTests (Debug, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/bin/Debug/netcoreapp2.0/osu.Game.Rulesets.Osu.Tests.dll"
|
"${workspaceRoot}/bin/Debug/netcoreapp2.1/osu.Game.Rulesets.Osu.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Debug, dotnet)",
|
"preLaunchTask": "Build (Debug, dotnet)",
|
||||||
@ -43,12 +43,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Release, netcoreapp2.0)",
|
"name": "VisualTests (Release, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/bin/Debug/netcoreapp2.0/osu.Game.Rulesets.Osu.Tests.dll"
|
"${workspaceRoot}/bin/Release/netcoreapp2.1/osu.Game.Rulesets.Osu.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Release, dotnet)",
|
"preLaunchTask": "Build (Release, dotnet)",
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Rulesets.Osu.Tests.csproj",
|
"osu.Game.Rulesets.Osu.Tests.csproj",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
"/verbosity:m"
|
"/verbosity:m"
|
||||||
@ -56,7 +56,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Rulesets.Osu.Tests.csproj",
|
"osu.Game.Rulesets.Osu.Tests.csproj",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:Configuration=Release",
|
"/p:Configuration=Release",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
@ -75,7 +75,7 @@
|
|||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Restore (netcoreapp2.0)",
|
"label": "Restore (netcoreapp2.1)",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<Import Project="..\osu.TestProject.props" />
|
<Import Project="..\osu.TestProject.props" />
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFrameworks>netcoreapp2.0;net471</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1;net471</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"type": "mono",
|
"type": "mono",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceRoot}/bin/Debug/net471/osu.Game.Rulesets.Taiko.Tests.exe",
|
"program": "${workspaceRoot}/bin/Release/net471/osu.Game.Rulesets.Taiko.Tests.exe",
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Release, msbuild)",
|
"preLaunchTask": "Build (Release, msbuild)",
|
||||||
"runtimeExecutable": null,
|
"runtimeExecutable": null,
|
||||||
@ -30,12 +30,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Debug, netcoreapp2.0)",
|
"name": "VisualTests (Debug, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/bin/Debug/netcoreapp2.0/osu.Game.Rulesets.Taiko.Tests.dll"
|
"${workspaceRoot}/bin/Debug/netcoreapp2.1/osu.Game.Rulesets.Taiko.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Debug, dotnet)",
|
"preLaunchTask": "Build (Debug, dotnet)",
|
||||||
@ -43,12 +43,12 @@
|
|||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VisualTests (Release, netcoreapp2.0)",
|
"name": "VisualTests (Release, netcoreapp2.1)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "dotnet",
|
"program": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceRoot}/bin/Debug/netcoreapp2.0/osu.Game.Rulesets.Taiko.Tests.dll"
|
"${workspaceRoot}/bin/Release/netcoreapp2.1/osu.Game.Rulesets.Taiko.Tests.dll"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "Build (Release, dotnet)",
|
"preLaunchTask": "Build (Release, dotnet)",
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Rulesets.Taiko.Tests.csproj",
|
"osu.Game.Rulesets.Taiko.Tests.csproj",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
"/verbosity:m"
|
"/verbosity:m"
|
||||||
@ -56,7 +56,7 @@
|
|||||||
"build",
|
"build",
|
||||||
"--no-restore",
|
"--no-restore",
|
||||||
"osu.Game.Rulesets.Taiko.Tests.csproj",
|
"osu.Game.Rulesets.Taiko.Tests.csproj",
|
||||||
"/p:TargetFramework=netcoreapp2.0",
|
"/p:TargetFramework=netcoreapp2.1",
|
||||||
"/p:Configuration=Release",
|
"/p:Configuration=Release",
|
||||||
"/p:GenerateFullPaths=true",
|
"/p:GenerateFullPaths=true",
|
||||||
"/m",
|
"/m",
|
||||||
@ -75,7 +75,7 @@
|
|||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Restore (netcoreapp2.0)",
|
"label": "Restore (netcoreapp2.1)",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<Import Project="..\osu.TestProject.props" />
|
<Import Project="..\osu.TestProject.props" />
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFrameworks>netcoreapp2.0;net471</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1;net471</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj" />
|
||||||
|
@ -65,11 +65,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
carousel.SelectionChanged = s => currentSelection = s;
|
carousel.SelectionChanged = s => currentSelection = s;
|
||||||
|
|
||||||
AddStep("Load Beatmaps", () => { carousel.BeatmapSets = beatmapSets; });
|
loadBeatmaps(beatmapSets);
|
||||||
|
|
||||||
bool changed = false;
|
|
||||||
carousel.BeatmapSetsChanged = () => changed = true;
|
|
||||||
AddUntilStep(() => changed, "Wait for load");
|
|
||||||
|
|
||||||
testTraversal();
|
testTraversal();
|
||||||
testFiltering();
|
testFiltering();
|
||||||
@ -84,6 +80,17 @@ namespace osu.Game.Tests.Visual
|
|||||||
testCarouselRootIsRandom();
|
testCarouselRootIsRandom();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadBeatmaps(List<BeatmapSetInfo> beatmapSets)
|
||||||
|
{
|
||||||
|
bool changed = false;
|
||||||
|
AddStep($"Load {beatmapSets.Count} Beatmaps", () =>
|
||||||
|
{
|
||||||
|
carousel.BeatmapSetsChanged = () => changed = true;
|
||||||
|
carousel.BeatmapSets = beatmapSets;
|
||||||
|
});
|
||||||
|
AddUntilStep(() => changed, "Wait for load");
|
||||||
|
}
|
||||||
|
|
||||||
private void ensureRandomFetchSuccess() =>
|
private void ensureRandomFetchSuccess() =>
|
||||||
AddAssert("ensure prev random fetch worked", () => selectedSets.Peek() == carousel.SelectedBeatmapSet);
|
AddAssert("ensure prev random fetch worked", () => selectedSets.Peek() == carousel.SelectedBeatmapSet);
|
||||||
|
|
||||||
@ -423,7 +430,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
for (int i = 1; i <= 50; i++)
|
for (int i = 1; i <= 50; i++)
|
||||||
beatmapSets.Add(createTestBeatmapSet(i));
|
beatmapSets.Add(createTestBeatmapSet(i));
|
||||||
|
|
||||||
AddStep("Load 50 Beatmaps", () => { carousel.BeatmapSets = beatmapSets; });
|
loadBeatmaps(beatmapSets);
|
||||||
advanceSelection(direction: 1, diff: false);
|
advanceSelection(direction: 1, diff: false);
|
||||||
checkNonmatchingFilter();
|
checkNonmatchingFilter();
|
||||||
checkNonmatchingFilter();
|
checkNonmatchingFilter();
|
||||||
|
115
osu.Game.Tests/Visual/TestCaseLoaderAnimation.cs
Normal file
115
osu.Game.Tests/Visual/TestCaseLoaderAnimation.cs
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Game.Screens;
|
||||||
|
using osu.Game.Screens.Menu;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class TestCaseLoaderAnimation : OsuTestCase
|
||||||
|
{
|
||||||
|
private TestLoader loader;
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
// required to preload the logo in a headless run (so it doesn't delay the loading itself).
|
||||||
|
Add(new OsuLogo());
|
||||||
|
|
||||||
|
bool logoVisible = false;
|
||||||
|
AddStep("almost instant display", () => Child = loader = new TestLoader(250));
|
||||||
|
AddUntilStep(() =>
|
||||||
|
{
|
||||||
|
logoVisible = loader.Logo?.Alpha > 0;
|
||||||
|
return loader.Logo != null && loader.ScreenLoaded;
|
||||||
|
}, "loaded");
|
||||||
|
AddAssert("logo not visible", () => !logoVisible);
|
||||||
|
|
||||||
|
AddStep("short load", () => Child = loader = new TestLoader(800));
|
||||||
|
AddUntilStep(() =>
|
||||||
|
{
|
||||||
|
logoVisible = loader.Logo?.Alpha > 0;
|
||||||
|
return loader.Logo != null && loader.ScreenLoaded;
|
||||||
|
}, "loaded");
|
||||||
|
AddAssert("logo visible", () => logoVisible);
|
||||||
|
AddUntilStep(() => loader.Logo?.Alpha == 0, "logo gone");
|
||||||
|
|
||||||
|
AddStep("longer load", () => Child = loader = new TestLoader(1400));
|
||||||
|
AddUntilStep(() =>
|
||||||
|
{
|
||||||
|
logoVisible = loader.Logo?.Alpha > 0;
|
||||||
|
return loader.Logo != null && loader.ScreenLoaded;
|
||||||
|
}, "loaded");
|
||||||
|
AddAssert("logo visible", () => logoVisible);
|
||||||
|
AddUntilStep(() => loader.Logo?.Alpha == 0, "logo gone");
|
||||||
|
}
|
||||||
|
|
||||||
|
private class TestLoader : Loader
|
||||||
|
{
|
||||||
|
private readonly double delay;
|
||||||
|
|
||||||
|
public OsuLogo Logo;
|
||||||
|
private TestScreen screen;
|
||||||
|
|
||||||
|
public bool ScreenLoaded => screen.IsCurrentScreen;
|
||||||
|
|
||||||
|
public TestLoader(double delay)
|
||||||
|
{
|
||||||
|
this.delay = delay;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||||
|
{
|
||||||
|
Logo = logo;
|
||||||
|
base.LogoArriving(logo, resuming);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override OsuScreen CreateLoadableScreen() => screen = new TestScreen();
|
||||||
|
protected override ShaderPrecompiler CreateShaderPrecompiler() => new TestShaderPrecompiler(delay);
|
||||||
|
|
||||||
|
private class TestShaderPrecompiler : ShaderPrecompiler
|
||||||
|
{
|
||||||
|
private readonly double delay;
|
||||||
|
private double startTime;
|
||||||
|
|
||||||
|
public TestShaderPrecompiler(double delay)
|
||||||
|
{
|
||||||
|
this.delay = delay;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
startTime = Time.Current;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool AllLoaded => Time.Current > startTime + delay;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class TestScreen : OsuScreen
|
||||||
|
{
|
||||||
|
public TestScreen()
|
||||||
|
{
|
||||||
|
Child = new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.DarkSlateGray,
|
||||||
|
Alpha = 0,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||||
|
{
|
||||||
|
base.LogoArriving(logo, resuming);
|
||||||
|
Child.FadeInFromZero(200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
<Import Project="..\osu.TestProject.props" />
|
<Import Project="..\osu.TestProject.props" />
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFrameworks>netcoreapp2.0;net471</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1;net471</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
||||||
|
@ -170,7 +170,7 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
if (error is OperationCanceledException) return;
|
if (error is OperationCanceledException) return;
|
||||||
|
|
||||||
downloadNotification.State = ProgressNotificationState.Completed;
|
downloadNotification.State = ProgressNotificationState.Cancelled;
|
||||||
Logger.Error(error, "Beatmap download failed!");
|
Logger.Error(error, "Beatmap download failed!");
|
||||||
currentDownloads.Remove(request);
|
currentDownloads.Remove(request);
|
||||||
};
|
};
|
||||||
|
@ -36,6 +36,11 @@ namespace osu.Game.Beatmaps
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HasVideo { get; set; }
|
public bool HasVideo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether or not this beatmap set has a storyboard.
|
||||||
|
/// </summary>
|
||||||
|
public bool HasStoryboard { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The different sizes of cover art for this beatmap set.
|
/// The different sizes of cover art for this beatmap set.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -73,6 +73,7 @@ namespace osu.Game.Online.API
|
|||||||
throw new TimeoutException(@"API request timeout hit");
|
throw new TimeoutException(@"API request timeout hit");
|
||||||
|
|
||||||
WebRequest = CreateWebRequest();
|
WebRequest = CreateWebRequest();
|
||||||
|
WebRequest.Failed += Fail;
|
||||||
WebRequest.AllowRetryOnTimeout = false;
|
WebRequest.AllowRetryOnTimeout = false;
|
||||||
WebRequest.AddHeader("Authorization", $"Bearer {api.AccessToken}");
|
WebRequest.AddHeader("Authorization", $"Bearer {api.AccessToken}");
|
||||||
|
|
||||||
|
@ -30,6 +30,9 @@ namespace osu.Game.Online.API.Requests
|
|||||||
[JsonProperty(@"video")]
|
[JsonProperty(@"video")]
|
||||||
private bool hasVideo { get; set; }
|
private bool hasVideo { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty(@"storyboard")]
|
||||||
|
private bool hasStoryboard { get; set; }
|
||||||
|
|
||||||
[JsonProperty(@"status")]
|
[JsonProperty(@"status")]
|
||||||
private BeatmapSetOnlineStatus status { get; set; }
|
private BeatmapSetOnlineStatus status { get; set; }
|
||||||
|
|
||||||
@ -65,6 +68,7 @@ namespace osu.Game.Online.API.Requests
|
|||||||
BPM = bpm,
|
BPM = bpm,
|
||||||
Status = status,
|
Status = status,
|
||||||
HasVideo = hasVideo,
|
HasVideo = hasVideo,
|
||||||
|
HasStoryboard = hasStoryboard,
|
||||||
Submitted = submitted,
|
Submitted = submitted,
|
||||||
Ranked = ranked,
|
Ranked = ranked,
|
||||||
LastUpdated = lastUpdated,
|
LastUpdated = lastUpdated,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
@ -16,6 +17,6 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
public Bindable<GameType> Type = new Bindable<GameType>();
|
public Bindable<GameType> Type = new Bindable<GameType>();
|
||||||
public Bindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
|
public Bindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
|
||||||
public Bindable<int?> MaxParticipants = new Bindable<int?>();
|
public Bindable<int?> MaxParticipants = new Bindable<int?>();
|
||||||
public Bindable<User[]> Participants = new Bindable<User[]>();
|
public Bindable<IEnumerable<User>> Participants = new Bindable<IEnumerable<User>>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = $"from {SetInfo.Metadata.Source}",
|
Text = $"{SetInfo.Metadata.Source}",
|
||||||
TextSize = 14,
|
TextSize = 14,
|
||||||
Shadow = false,
|
Shadow = false,
|
||||||
Colour = colours.Gray5,
|
Colour = colours.Gray5,
|
||||||
@ -195,18 +195,18 @@ namespace osu.Game.Overlays.Direct
|
|||||||
new Statistic(FontAwesome.fa_heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
new Statistic(FontAwesome.fa_heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
playButton = new PlayButton(SetInfo)
|
|
||||||
{
|
|
||||||
Margin = new MarginPadding { Top = 5, Left = 10 },
|
|
||||||
Size = new Vector2(30),
|
|
||||||
Alpha = 0,
|
|
||||||
},
|
|
||||||
statusContainer = new FillFlowContainer
|
statusContainer = new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Margin = new MarginPadding { Top = 5, Left = 5 },
|
Margin = new MarginPadding { Top = 5, Left = 5 },
|
||||||
Spacing = new Vector2(5),
|
Spacing = new Vector2(5),
|
||||||
},
|
},
|
||||||
|
playButton = new PlayButton(SetInfo)
|
||||||
|
{
|
||||||
|
Margin = new MarginPadding { Top = 5, Left = 10 },
|
||||||
|
Size = new Vector2(30),
|
||||||
|
Alpha = 0,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (SetInfo.OnlineInfo?.HasVideo ?? false)
|
if (SetInfo.OnlineInfo?.HasVideo ?? false)
|
||||||
@ -214,24 +214,31 @@ namespace osu.Game.Overlays.Direct
|
|||||||
statusContainer.Add(new IconPill(FontAwesome.fa_film));
|
statusContainer.Add(new IconPill(FontAwesome.fa_film));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SetInfo.OnlineInfo?.HasStoryboard ?? false)
|
||||||
|
{
|
||||||
|
statusContainer.Add(new IconPill(FontAwesome.fa_image));
|
||||||
|
}
|
||||||
|
|
||||||
statusContainer.Add(new BeatmapSetOnlineStatusPill(12, new MarginPadding { Horizontal = 10, Vertical = 5 })
|
statusContainer.Add(new BeatmapSetOnlineStatusPill(12, new MarginPadding { Horizontal = 10, Vertical = 5 })
|
||||||
{
|
{
|
||||||
Status = SetInfo.OnlineInfo?.Status ?? BeatmapSetOnlineStatus.None,
|
Status = SetInfo.OnlineInfo?.Status ?? BeatmapSetOnlineStatus.None,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
PreviewPlaying.ValueChanged += _ => updateStatusContainer();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
statusContainer.FadeOut(120, Easing.InOutQuint);
|
updateStatusContainer();
|
||||||
|
|
||||||
return base.OnHover(state);
|
return base.OnHover(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
protected override void OnHoverLost(InputState state)
|
||||||
{
|
{
|
||||||
base.OnHoverLost(state);
|
base.OnHoverLost(state);
|
||||||
|
updateStatusContainer();
|
||||||
statusContainer.FadeIn(120, Easing.InOutQuint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateStatusContainer() => statusContainer.FadeTo(IsHovered || PreviewPlaying ? 0 : 1, 120, Easing.InOutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
icon.Icon = playing ? FontAwesome.fa_pause : FontAwesome.fa_play;
|
icon.Icon = playing ? FontAwesome.fa_stop : FontAwesome.fa_play;
|
||||||
icon.FadeColour(playing || IsHovered ? hoverColour : Color4.White, 120, Easing.InOutQuint);
|
icon.FadeColour(playing || IsHovered ? hoverColour : Color4.White, 120, Easing.InOutQuint);
|
||||||
|
|
||||||
if (playing)
|
if (playing)
|
||||||
|
@ -180,7 +180,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnWheel(InputState state)
|
protected override bool OnScroll(InputState state)
|
||||||
{
|
{
|
||||||
if (HasFocus)
|
if (HasFocus)
|
||||||
{
|
{
|
||||||
@ -192,7 +192,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.OnWheel(state);
|
return base.OnScroll(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using osu.Framework.Logging;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets
|
namespace osu.Game.Rulesets
|
||||||
@ -114,8 +115,9 @@ namespace osu.Game.Rulesets
|
|||||||
var assembly = Assembly.LoadFrom(file);
|
var assembly = Assembly.LoadFrom(file);
|
||||||
loaded_assemblies[assembly] = assembly.GetTypes().First(t => t.IsPublic && t.IsSubclassOf(typeof(Ruleset)));
|
loaded_assemblies[assembly] = assembly.GetTypes().First(t => t.IsPublic && t.IsSubclassOf(typeof(Ruleset)));
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Logger.Error(e, "Failed to load ruleset");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,9 +182,9 @@ namespace osu.Game.Screens.Edit
|
|||||||
LoadComponentAsync(currentScreen, screenContainer.Add);
|
LoadComponentAsync(currentScreen, screenContainer.Add);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnWheel(InputState state)
|
protected override bool OnScroll(InputState state)
|
||||||
{
|
{
|
||||||
if (state.Mouse.WheelDelta > 0)
|
if (state.Mouse.ScrollDelta.X + state.Mouse.ScrollDelta.Y > 0)
|
||||||
clock.SeekBackward(true);
|
clock.SeekBackward(true);
|
||||||
else
|
else
|
||||||
clock.SeekForward(true);
|
clock.SeekForward(true);
|
||||||
|
@ -123,15 +123,15 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private float? localZoomTarget;
|
private float? localZoomTarget;
|
||||||
|
|
||||||
protected override bool OnWheel(InputState state)
|
protected override bool OnScroll(InputState state)
|
||||||
{
|
{
|
||||||
if (!state.Keyboard.ControlPressed)
|
if (!state.Keyboard.ControlPressed)
|
||||||
return base.OnWheel(state);
|
return base.OnScroll(state);
|
||||||
|
|
||||||
relativeContentZoomTarget = Content.ToLocalSpace(state.Mouse.NativeState.Position).X / Content.DrawSize.X;
|
relativeContentZoomTarget = Content.ToLocalSpace(state.Mouse.NativeState.Position).X / Content.DrawSize.X;
|
||||||
localZoomTarget = ToLocalSpace(state.Mouse.NativeState.Position).X;
|
localZoomTarget = ToLocalSpace(state.Mouse.NativeState.Position).X;
|
||||||
|
|
||||||
Zoom += state.Mouse.WheelDelta;
|
Zoom += state.Mouse.ScrollDelta.Y;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -30,43 +29,48 @@ namespace osu.Game.Screens
|
|||||||
{
|
{
|
||||||
base.LogoArriving(logo, resuming);
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
|
logo.BeatMatching = false;
|
||||||
logo.Triangles = false;
|
logo.Triangles = false;
|
||||||
logo.Origin = Anchor.BottomRight;
|
logo.Origin = Anchor.BottomRight;
|
||||||
logo.Anchor = Anchor.BottomRight;
|
logo.Anchor = Anchor.BottomRight;
|
||||||
logo.Position = new Vector2(-40);
|
logo.Position = new Vector2(-40);
|
||||||
logo.Scale = new Vector2(0.2f);
|
logo.Scale = new Vector2(0.2f);
|
||||||
|
|
||||||
logo.FadeInFromZero(5000, Easing.OutQuint);
|
logo.Delay(500).FadeInFromZero(1000, Easing.OutQuint);
|
||||||
}
|
|
||||||
|
|
||||||
private OsuScreen loadScreen;
|
|
||||||
private ShaderPrecompiler precompiler;
|
|
||||||
|
|
||||||
protected override void OnEntering(Screen last)
|
|
||||||
{
|
|
||||||
base.OnEntering(last);
|
|
||||||
|
|
||||||
LoadComponentAsync(precompiler = new ShaderPrecompiler(loadIfReady), Add);
|
|
||||||
LoadComponentAsync(loadScreen = showDisclaimer ? (OsuScreen)new Disclaimer() : new Intro(), s => loadIfReady());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadIfReady()
|
|
||||||
{
|
|
||||||
if (ChildScreen == loadScreen) return;
|
|
||||||
|
|
||||||
if (loadScreen.LoadState != LoadState.Ready)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!precompiler.FinishedCompiling)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Push(loadScreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LogoSuspending(OsuLogo logo)
|
protected override void LogoSuspending(OsuLogo logo)
|
||||||
{
|
{
|
||||||
base.LogoSuspending(logo);
|
base.LogoSuspending(logo);
|
||||||
logo.FadeOut(100);
|
logo.FadeOut(logo.Alpha * 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
private OsuScreen loadableScreen;
|
||||||
|
private ShaderPrecompiler precompiler;
|
||||||
|
|
||||||
|
protected virtual OsuScreen CreateLoadableScreen() => showDisclaimer ? (OsuScreen)new Disclaimer() : new Intro();
|
||||||
|
|
||||||
|
protected virtual ShaderPrecompiler CreateShaderPrecompiler() => new ShaderPrecompiler();
|
||||||
|
|
||||||
|
protected override void OnEntering(Screen last)
|
||||||
|
{
|
||||||
|
base.OnEntering(last);
|
||||||
|
|
||||||
|
LoadComponentAsync(precompiler = CreateShaderPrecompiler(), Add);
|
||||||
|
LoadComponentAsync(loadableScreen = CreateLoadableScreen());
|
||||||
|
|
||||||
|
checkIfLoaded();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkIfLoaded()
|
||||||
|
{
|
||||||
|
if (loadableScreen.LoadState != LoadState.Ready || !precompiler.FinishedCompiling)
|
||||||
|
{
|
||||||
|
Schedule(checkIfLoaded);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Push(loadableScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -80,16 +84,10 @@ namespace osu.Game.Screens
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class ShaderPrecompiler : Drawable
|
public class ShaderPrecompiler : Drawable
|
||||||
{
|
{
|
||||||
private readonly Action onLoaded;
|
|
||||||
private readonly List<Shader> loadTargets = new List<Shader>();
|
private readonly List<Shader> loadTargets = new List<Shader>();
|
||||||
|
|
||||||
public bool FinishedCompiling { get; private set; }
|
public bool FinishedCompiling { get; private set; }
|
||||||
|
|
||||||
public ShaderPrecompiler(Action onLoaded)
|
|
||||||
{
|
|
||||||
this.onLoaded = onLoaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ShaderManager manager)
|
private void load(ShaderManager manager)
|
||||||
{
|
{
|
||||||
@ -103,16 +101,17 @@ namespace osu.Game.Screens
|
|||||||
loadTargets.Add(manager.Load(VertexShaderDescriptor.TEXTURE_3, FragmentShaderDescriptor.TEXTURE));
|
loadTargets.Add(manager.Load(VertexShaderDescriptor.TEXTURE_3, FragmentShaderDescriptor.TEXTURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual bool AllLoaded => loadTargets.All(s => s.Loaded);
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
// if our target is null we are done.
|
// if our target is null we are done.
|
||||||
if (loadTargets.All(s => s.Loaded))
|
if (AllLoaded)
|
||||||
{
|
{
|
||||||
FinishedCompiling = true;
|
FinishedCompiling = true;
|
||||||
Expire();
|
Expire();
|
||||||
onLoaded?.Invoke();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,31 +79,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
seeya = audio.Sample.Get(@"seeya");
|
seeya = audio.Sample.Get(@"seeya");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnEntering(Screen last)
|
|
||||||
{
|
|
||||||
base.OnEntering(last);
|
|
||||||
|
|
||||||
Game.Beatmap.Value = beatmap;
|
|
||||||
|
|
||||||
if (menuVoice)
|
|
||||||
welcome.Play();
|
|
||||||
|
|
||||||
Scheduler.AddDelayed(delegate
|
|
||||||
{
|
|
||||||
// Only start the current track if it is the menu music. A beatmap's track is started when entering the Main Manu.
|
|
||||||
if (menuMusic)
|
|
||||||
track.Start();
|
|
||||||
|
|
||||||
LoadComponentAsync(mainMenu = new MainMenu());
|
|
||||||
|
|
||||||
Scheduler.AddDelayed(delegate
|
|
||||||
{
|
|
||||||
DidLoadMenu = true;
|
|
||||||
Push(mainMenu);
|
|
||||||
}, delay_step_one);
|
|
||||||
}, delay_step_two);
|
|
||||||
}
|
|
||||||
|
|
||||||
private const double delay_step_one = 2300;
|
private const double delay_step_one = 2300;
|
||||||
private const double delay_step_two = 600;
|
private const double delay_step_two = 600;
|
||||||
|
|
||||||
@ -113,6 +88,29 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
base.LogoArriving(logo, resuming);
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
|
if (!resuming)
|
||||||
|
{
|
||||||
|
Game.Beatmap.Value = beatmap;
|
||||||
|
|
||||||
|
if (menuVoice)
|
||||||
|
welcome.Play();
|
||||||
|
|
||||||
|
Scheduler.AddDelayed(delegate
|
||||||
|
{
|
||||||
|
// Only start the current track if it is the menu music. A beatmap's track is started when entering the Main Manu.
|
||||||
|
if (menuMusic)
|
||||||
|
track.Start();
|
||||||
|
|
||||||
|
LoadComponentAsync(mainMenu = new MainMenu());
|
||||||
|
|
||||||
|
Scheduler.AddDelayed(delegate
|
||||||
|
{
|
||||||
|
DidLoadMenu = true;
|
||||||
|
Push(mainMenu);
|
||||||
|
}, delay_step_one);
|
||||||
|
}, delay_step_two);
|
||||||
|
}
|
||||||
|
|
||||||
logo.RelativePositionAxes = Axes.Both;
|
logo.RelativePositionAxes = Axes.Both;
|
||||||
logo.Colour = Color4.White;
|
logo.Colour = Color4.White;
|
||||||
logo.Ripple = false;
|
logo.Ripple = false;
|
||||||
|
@ -24,8 +24,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||||
|
|
||||||
private readonly Box leftBox;
|
private Box leftBox;
|
||||||
private readonly Box rightBox;
|
private Box rightBox;
|
||||||
|
|
||||||
private const float amplitude_dead_zone = 0.25f;
|
private const float amplitude_dead_zone = 0.25f;
|
||||||
private const float alpha_multiplier = (1 - amplitude_dead_zone) / 0.55f;
|
private const float alpha_multiplier = (1 - amplitude_dead_zone) / 0.55f;
|
||||||
@ -42,27 +42,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
leftBox = new Box
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
RelativeSizeAxes = Axes.Y,
|
|
||||||
Width = box_width,
|
|
||||||
Alpha = 0,
|
|
||||||
Blending = BlendingMode.Additive,
|
|
||||||
},
|
|
||||||
rightBox = new Box
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreRight,
|
|
||||||
Origin = Anchor.CentreRight,
|
|
||||||
RelativeSizeAxes = Axes.Y,
|
|
||||||
Width = box_width,
|
|
||||||
Alpha = 0,
|
|
||||||
Blending = BlendingMode.Additive,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -72,10 +51,34 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
// linear colour looks better in this case, so let's use it for now.
|
// linear colour looks better in this case, so let's use it for now.
|
||||||
Color4 gradientDark = colours.Blue.Opacity(0).ToLinear();
|
Color4 gradientDark = colours.Blue.Opacity(0).ToLinear();
|
||||||
Color4 gradientLight = colours.Blue.Opacity(0.3f).ToLinear();
|
Color4 gradientLight = colours.Blue.Opacity(0.6f).ToLinear();
|
||||||
|
|
||||||
leftBox.Colour = ColourInfo.GradientHorizontal(gradientLight, gradientDark);
|
Children = new Drawable[]
|
||||||
rightBox.Colour = ColourInfo.GradientHorizontal(gradientDark, gradientLight);
|
{
|
||||||
|
leftBox = new Box
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Width = box_width * 2,
|
||||||
|
// align off-screen to make sure our edges don't become visible during parallax.
|
||||||
|
X = -box_width,
|
||||||
|
Alpha = 0,
|
||||||
|
Blending = BlendingMode.Additive,
|
||||||
|
Colour = ColourInfo.GradientHorizontal(gradientLight, gradientDark)
|
||||||
|
},
|
||||||
|
rightBox = new Box
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreRight,
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Width = box_width * 2,
|
||||||
|
X = box_width,
|
||||||
|
Alpha = 0,
|
||||||
|
Blending = BlendingMode.Additive,
|
||||||
|
Colour = ColourInfo.GradientHorizontal(gradientDark, gradientLight)
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
||||||
|
@ -64,6 +64,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
set { colourAndTriangles.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint); }
|
set { colourAndTriangles.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool BeatMatching = true;
|
||||||
|
|
||||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => logoContainer.ReceiveMouseInputAt(screenSpacePos);
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => logoContainer.ReceiveMouseInputAt(screenSpacePos);
|
||||||
|
|
||||||
public bool Ripple
|
public bool Ripple
|
||||||
@ -264,6 +266,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
|
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
|
||||||
|
|
||||||
|
if (!BeatMatching) return;
|
||||||
|
|
||||||
lastBeatIndex = beatIndex;
|
lastBeatIndex = beatIndex;
|
||||||
|
|
||||||
var beatLength = timingPoint.BeatLength;
|
var beatLength = timingPoint.BeatLength;
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
private readonly Bindable<RoomStatus> statusBind = new Bindable<RoomStatus>();
|
private readonly Bindable<RoomStatus> statusBind = new Bindable<RoomStatus>();
|
||||||
private readonly Bindable<GameType> typeBind = new Bindable<GameType>();
|
private readonly Bindable<GameType> typeBind = new Bindable<GameType>();
|
||||||
private readonly Bindable<BeatmapInfo> beatmapBind = new Bindable<BeatmapInfo>();
|
private readonly Bindable<BeatmapInfo> beatmapBind = new Bindable<BeatmapInfo>();
|
||||||
private readonly Bindable<User[]> participantsBind = new Bindable<User[]>();
|
private readonly Bindable<IEnumerable<User>> participantsBind = new Bindable<IEnumerable<User>>();
|
||||||
|
|
||||||
public readonly Room Room;
|
public readonly Room Room;
|
||||||
|
|
||||||
|
@ -12,28 +12,23 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
private const float text_size = 30;
|
private const float text_size = 30;
|
||||||
private const float transition_duration = 100;
|
private const float transition_duration = 100;
|
||||||
|
|
||||||
private readonly OsuSpriteText count, slash, max;
|
private readonly OsuSpriteText count, slash, maxText;
|
||||||
|
|
||||||
public int Count
|
public int Count
|
||||||
{
|
{
|
||||||
set => count.Text = value.ToString();
|
set => count.Text = value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int? max;
|
||||||
public int? Max
|
public int? Max
|
||||||
{
|
{
|
||||||
|
get => max;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null)
|
if (value == max) return;
|
||||||
{
|
max = value;
|
||||||
slash.FadeOut(transition_duration);
|
|
||||||
max.FadeOut(transition_duration);
|
updateMax();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
slash.FadeIn(transition_duration);
|
|
||||||
max.Text = value.ToString();
|
|
||||||
max.FadeIn(transition_duration);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,12 +51,29 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
TextSize = text_size,
|
TextSize = text_size,
|
||||||
Font = @"Exo2.0-Light"
|
Font = @"Exo2.0-Light"
|
||||||
},
|
},
|
||||||
max = new OsuSpriteText
|
maxText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
TextSize = text_size,
|
TextSize = text_size,
|
||||||
Font = @"Exo2.0-Light"
|
Font = @"Exo2.0-Light"
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
updateMax();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateMax()
|
||||||
|
{
|
||||||
|
if (Max == null)
|
||||||
|
{
|
||||||
|
slash.FadeOut(transition_duration);
|
||||||
|
maxText.FadeOut(transition_duration);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
slash.FadeIn(transition_duration);
|
||||||
|
maxText.Text = Max.ToString();
|
||||||
|
maxText.FadeIn(transition_duration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
@ -33,7 +34,7 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
private readonly Bindable<GameType> typeBind = new Bindable<GameType>();
|
private readonly Bindable<GameType> typeBind = new Bindable<GameType>();
|
||||||
private readonly Bindable<BeatmapInfo> beatmapBind = new Bindable<BeatmapInfo>();
|
private readonly Bindable<BeatmapInfo> beatmapBind = new Bindable<BeatmapInfo>();
|
||||||
private readonly Bindable<int?> maxParticipantsBind = new Bindable<int?>();
|
private readonly Bindable<int?> maxParticipantsBind = new Bindable<int?>();
|
||||||
private readonly Bindable<User[]> participantsBind = new Bindable<User[]>();
|
private readonly Bindable<IEnumerable<User>> participantsBind = new Bindable<IEnumerable<User>>();
|
||||||
|
|
||||||
private OsuColour colours;
|
private OsuColour colours;
|
||||||
private Box statusStrip;
|
private Box statusStrip;
|
||||||
@ -214,7 +215,7 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
|
|
||||||
participantsBind.ValueChanged += p =>
|
participantsBind.ValueChanged += p =>
|
||||||
{
|
{
|
||||||
participantCount.Count = p.Length;
|
participantCount.Count = p.Count();
|
||||||
participantInfo.Participants = p;
|
participantInfo.Participants = p;
|
||||||
participantsFlow.ChildrenEnumerable = p.Select(u => new UserTile(u));
|
participantsFlow.ChildrenEnumerable = p.Select(u => new UserTile(u));
|
||||||
};
|
};
|
||||||
|
@ -225,6 +225,7 @@ namespace osu.Game.Screens
|
|||||||
logo.Anchor = Anchor.TopLeft;
|
logo.Anchor = Anchor.TopLeft;
|
||||||
logo.Origin = Anchor.Centre;
|
logo.Origin = Anchor.Centre;
|
||||||
logo.RelativePositionAxes = Axes.None;
|
logo.RelativePositionAxes = Axes.None;
|
||||||
|
logo.BeatMatching = true;
|
||||||
logo.Triangles = true;
|
logo.Triangles = true;
|
||||||
logo.Ripple = true;
|
logo.Ripple = true;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ namespace osu.Game.Screens.Play
|
|||||||
Background?.FadeTo(1f, fade_out_duration);
|
Background?.FadeTo(1f, fade_out_duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;
|
protected override bool OnScroll(InputState state) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;
|
||||||
|
|
||||||
private void initializeStoryboard(bool asyncLoad)
|
private void initializeStoryboard(bool asyncLoad)
|
||||||
{
|
{
|
||||||
|
@ -50,11 +50,11 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
content.ResizeHeightTo(0, transition_duration, Easing.OutQuint);
|
content.ResizeHeightTo(0, transition_duration, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
button.FadeColour(expanded ? buttonActiveColour : Color4.White, 200, Easing.OutQuint);
|
updateExpanded();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color4 buttonActiveColour;
|
private Color4 expandedColour;
|
||||||
|
|
||||||
protected PlayerSettingsGroup()
|
protected PlayerSettingsGroup()
|
||||||
{
|
{
|
||||||
@ -130,9 +130,13 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
button.Colour = buttonActiveColour = colours.Yellow;
|
expandedColour = colours.Yellow;
|
||||||
|
|
||||||
|
updateExpanded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateExpanded() => button.FadeColour(expanded ? expandedColour : Color4.White, 200, Easing.InOutQuint);
|
||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
protected override bool OnHover(InputState state) => true;
|
protected override bool OnHover(InputState state) => true;
|
||||||
|
@ -92,6 +92,6 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string formatTime(TimeSpan timeSpan) => $"{(timeSpan < TimeSpan.Zero ? "-" : "")}{timeSpan.Duration().TotalMinutes:N0}:{timeSpan.Duration().Seconds:D2}";
|
private string formatTime(TimeSpan timeSpan) => $"{(timeSpan < TimeSpan.Zero ? "-" : "")}{Math.Floor(timeSpan.Duration().TotalMinutes)}:{timeSpan.Duration().Seconds:D2}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
Clock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnWheel(InputState state)
|
protected override bool OnScroll(InputState state)
|
||||||
{
|
{
|
||||||
if (state.Mouse.WheelDelta > 0)
|
if (state.Mouse.ScrollDelta.Y > 0)
|
||||||
Clock.SeekBackward(true);
|
Clock.SeekBackward(true);
|
||||||
else
|
else
|
||||||
Clock.SeekForward(true);
|
Clock.SeekForward(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user