mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:02:54 +08:00
Merge branch 'master' into slider_ticks
Conflicts: osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs osu.Game.Modes.Osu/Objects/Slider.cs
This commit is contained in:
commit
e2fae24ad5
1
.gitignore
vendored
1
.gitignore
vendored
@ -256,3 +256,4 @@ paket-files/
|
|||||||
# Python Tools for Visual Studio (PTVS)
|
# Python Tools for Visual Studio (PTVS)
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
|
Staging/
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 1cd7a165ec42cd1eeb4eee06b5a4a6cdd8c280da
|
Subproject commit a766d283f4d628736db784001cc1f11d065cab9d
|
28
osu.Desktop.Deploy/App.config
Normal file
28
osu.Desktop.Deploy/App.config
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<appSettings>
|
||||||
|
<add key="StagingFolder" value="Staging" />
|
||||||
|
<add key="ReleasesFolder" value="Releases" />
|
||||||
|
<add key="GitHubAccessToken" value="" />
|
||||||
|
<add key="GitHubUsername" value="ppy" />
|
||||||
|
<add key="GitHubRepoName" value="osu" />
|
||||||
|
<add key="ProjectName" value="osu.Desktop" />
|
||||||
|
<add key="NuSpecName" value="osu.Desktop\osu.nuspec" />
|
||||||
|
<add key="SolutionName" value="osu" />
|
||||||
|
<add key="TargetName" value="Client\osu.Desktop" />
|
||||||
|
<add key="PackageName" value="osulazer" />
|
||||||
|
<add key="IconName" value="lazer.ico" />
|
||||||
|
<add key="CodeSigningCertificate" value="" />
|
||||||
|
</appSettings>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||||
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
13
osu.Desktop.Deploy/GitHubObject.cs
Normal file
13
osu.Desktop.Deploy/GitHubObject.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace osu.Desktop.Deploy
|
||||||
|
{
|
||||||
|
internal class GitHubObject
|
||||||
|
{
|
||||||
|
[JsonProperty(@"id")]
|
||||||
|
public int Id;
|
||||||
|
|
||||||
|
[JsonProperty(@"name")]
|
||||||
|
public string Name;
|
||||||
|
}
|
||||||
|
}
|
25
osu.Desktop.Deploy/GitHubRelease.cs
Normal file
25
osu.Desktop.Deploy/GitHubRelease.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace osu.Desktop.Deploy
|
||||||
|
{
|
||||||
|
internal class GitHubRelease
|
||||||
|
{
|
||||||
|
[JsonProperty(@"id")]
|
||||||
|
public int Id;
|
||||||
|
|
||||||
|
[JsonProperty(@"tag_name")]
|
||||||
|
public string TagName => $"v{Name}";
|
||||||
|
|
||||||
|
[JsonProperty(@"name")]
|
||||||
|
public string Name;
|
||||||
|
|
||||||
|
[JsonProperty(@"draft")]
|
||||||
|
public bool Draft;
|
||||||
|
|
||||||
|
[JsonProperty(@"prerelease")]
|
||||||
|
public bool PreRelease;
|
||||||
|
|
||||||
|
[JsonProperty(@"upload_url")]
|
||||||
|
public string UploadUrl;
|
||||||
|
}
|
||||||
|
}
|
420
osu.Desktop.Deploy/Program.cs
Normal file
420
osu.Desktop.Deploy/Program.cs
Normal file
@ -0,0 +1,420 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.GitHubusercontent.com/ppy/osu-framework/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using osu.Framework.IO.Network;
|
||||||
|
using FileWebRequest = osu.Framework.IO.Network.FileWebRequest;
|
||||||
|
using WebRequest = osu.Framework.IO.Network.WebRequest;
|
||||||
|
|
||||||
|
namespace osu.Desktop.Deploy
|
||||||
|
{
|
||||||
|
internal static class Program
|
||||||
|
{
|
||||||
|
private const string nuget_path = @"packages\NuGet.CommandLine.3.5.0\tools\NuGet.exe";
|
||||||
|
private const string squirrel_path = @"packages\squirrel.windows.1.5.2\tools\Squirrel.exe";
|
||||||
|
private const string msbuild_path = @"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe";
|
||||||
|
|
||||||
|
public static string StagingFolder = ConfigurationManager.AppSettings["StagingFolder"];
|
||||||
|
public static string ReleasesFolder = ConfigurationManager.AppSettings["ReleasesFolder"];
|
||||||
|
public static string GitHubAccessToken = ConfigurationManager.AppSettings["GitHubAccessToken"];
|
||||||
|
public static string GitHubUsername = ConfigurationManager.AppSettings["GitHubUsername"];
|
||||||
|
public static string GitHubRepoName = ConfigurationManager.AppSettings["GitHubRepoName"];
|
||||||
|
public static string SolutionName = ConfigurationManager.AppSettings["SolutionName"];
|
||||||
|
public static string ProjectName = ConfigurationManager.AppSettings["ProjectName"];
|
||||||
|
public static string NuSpecName = ConfigurationManager.AppSettings["NuSpecName"];
|
||||||
|
public static string TargetName = ConfigurationManager.AppSettings["TargetName"];
|
||||||
|
public static string PackageName = ConfigurationManager.AppSettings["PackageName"];
|
||||||
|
public static string IconName = ConfigurationManager.AppSettings["IconName"];
|
||||||
|
public static string CodeSigningCertificate = ConfigurationManager.AppSettings["CodeSigningCertificate"];
|
||||||
|
|
||||||
|
public static string GitHubApiEndpoint => $"https://api.github.com/repos/{GitHubUsername}/{GitHubRepoName}/releases";
|
||||||
|
public static string GitHubReleasePage => $"https://github.com/{GitHubUsername}/{GitHubRepoName}/releases";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How many previous build deltas we want to keep when publishing.
|
||||||
|
/// </summary>
|
||||||
|
const int keep_delta_count = 3;
|
||||||
|
|
||||||
|
private static string codeSigningCmd => string.IsNullOrEmpty(codeSigningPassword) ? "" : $"-n \"/a /f {codeSigningCertPath} /p {codeSigningPassword} /t http://timestamp.comodoca.com/authenticode\"";
|
||||||
|
|
||||||
|
private static string homeDir => Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||||
|
private static string codeSigningCertPath => Path.Combine(homeDir, CodeSigningCertificate);
|
||||||
|
private static string solutionPath => Environment.CurrentDirectory;
|
||||||
|
private static string stagingPath => Path.Combine(solutionPath, StagingFolder);
|
||||||
|
private static string iconPath => Path.Combine(solutionPath, ProjectName, IconName);
|
||||||
|
|
||||||
|
private static string nupkgFilename(string ver) => $"{PackageName}.{ver}.nupkg";
|
||||||
|
private static string nupkgDistroFilename(string ver) => $"{PackageName}-{ver}-full.nupkg";
|
||||||
|
|
||||||
|
private static Stopwatch sw = new Stopwatch();
|
||||||
|
|
||||||
|
private static string codeSigningPassword;
|
||||||
|
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
displayHeader();
|
||||||
|
|
||||||
|
findSolutionPath();
|
||||||
|
|
||||||
|
if (!Directory.Exists(ReleasesFolder))
|
||||||
|
{
|
||||||
|
write("WARNING: No release directory found. Make sure you want this!", ConsoleColor.Yellow);
|
||||||
|
Directory.CreateDirectory(ReleasesFolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkGitHubReleases();
|
||||||
|
|
||||||
|
refreshDirectory(StagingFolder);
|
||||||
|
|
||||||
|
//increment build number until we have a unique one.
|
||||||
|
string verBase = DateTime.Now.ToString("yyyy.Md.");
|
||||||
|
int increment = 0;
|
||||||
|
while (Directory.GetFiles(ReleasesFolder, $"*{verBase}{increment}*").Any())
|
||||||
|
increment++;
|
||||||
|
|
||||||
|
string version = $"{verBase}{increment}";
|
||||||
|
|
||||||
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
|
Console.Write($"Ready to deploy {version}: ");
|
||||||
|
Console.ReadLine();
|
||||||
|
|
||||||
|
sw.Start();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(CodeSigningCertificate))
|
||||||
|
{
|
||||||
|
Console.Write("Enter code signing password: ");
|
||||||
|
codeSigningPassword = readLineMasked();
|
||||||
|
}
|
||||||
|
|
||||||
|
write("Restoring NuGet packages...");
|
||||||
|
runCommand(nuget_path, "restore " + solutionPath);
|
||||||
|
|
||||||
|
write("Updating AssemblyInfo...");
|
||||||
|
updateAssemblyInfo(version);
|
||||||
|
|
||||||
|
write("Running build process...");
|
||||||
|
runCommand(msbuild_path, $"/v:quiet /m /t:{TargetName.Replace('.', '_')} /p:OutputPath={stagingPath};Configuration=Release {SolutionName}.sln");
|
||||||
|
|
||||||
|
write("Creating NuGet deployment package...");
|
||||||
|
runCommand(nuget_path, $"pack {NuSpecName} -Version {version} -Properties Configuration=Deploy -OutputDirectory {stagingPath} -BasePath {stagingPath}");
|
||||||
|
|
||||||
|
//prune once before checking for files so we can avoid erroring on files which aren't even needed for this build.
|
||||||
|
pruneReleases();
|
||||||
|
|
||||||
|
checkReleaseFiles();
|
||||||
|
|
||||||
|
write("Running squirrel build...");
|
||||||
|
runCommand(squirrel_path, $"--releasify {stagingPath}\\{nupkgFilename(version)} --setupIcon {iconPath} --icon {iconPath} {codeSigningCmd} --no-msi");
|
||||||
|
|
||||||
|
//prune again to clean up before upload.
|
||||||
|
pruneReleases();
|
||||||
|
|
||||||
|
//rename setup to install.
|
||||||
|
File.Copy(Path.Combine(ReleasesFolder, "Setup.exe"), Path.Combine(ReleasesFolder, "install.exe"), true);
|
||||||
|
File.Delete(Path.Combine(ReleasesFolder, "Setup.exe"));
|
||||||
|
|
||||||
|
uploadBuild(version);
|
||||||
|
|
||||||
|
//reset assemblyinfo.
|
||||||
|
updateAssemblyInfo("0.0.0");
|
||||||
|
|
||||||
|
write("Done!", ConsoleColor.White);
|
||||||
|
Console.ReadLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void displayHeader()
|
||||||
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
|
Console.WriteLine();
|
||||||
|
Console.WriteLine(" Please note that OSU! and PPY are registered trademarks and as such covered by trademark law.");
|
||||||
|
Console.WriteLine(" Do not distribute builds of this project publicly that make use of these.");
|
||||||
|
Console.ResetColor();
|
||||||
|
Console.WriteLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Ensure we have all the files in the release directory which are expected to be there.
|
||||||
|
/// This should have been accounted for in earlier steps, and just serves as a verification step.
|
||||||
|
/// </summary>
|
||||||
|
private static void checkReleaseFiles()
|
||||||
|
{
|
||||||
|
var releaseLines = getReleaseLines();
|
||||||
|
|
||||||
|
//ensure we have all files necessary
|
||||||
|
foreach (var l in releaseLines)
|
||||||
|
if (!File.Exists(Path.Combine(ReleasesFolder, l.Filename)))
|
||||||
|
error($"Local file missing {l.Filename}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<ReleaseLine> getReleaseLines() => File.ReadAllLines(Path.Combine(ReleasesFolder, "RELEASES")).Select(l => new ReleaseLine(l));
|
||||||
|
|
||||||
|
private static void pruneReleases()
|
||||||
|
{
|
||||||
|
write("Pruning RELEASES...");
|
||||||
|
|
||||||
|
var releaseLines = getReleaseLines().ToList();
|
||||||
|
|
||||||
|
var fulls = releaseLines.Where(l => l.Filename.Contains("-full")).Reverse().Skip(1);
|
||||||
|
|
||||||
|
//remove any FULL releases (except most recent)
|
||||||
|
foreach (var l in fulls)
|
||||||
|
{
|
||||||
|
write($"- Removing old release {l.Filename}", ConsoleColor.Yellow);
|
||||||
|
File.Delete(Path.Combine(ReleasesFolder, l.Filename));
|
||||||
|
releaseLines.Remove(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
//remove excess deltas
|
||||||
|
var deltas = releaseLines.Where(l => l.Filename.Contains("-delta"));
|
||||||
|
if (deltas.Count() > keep_delta_count)
|
||||||
|
{
|
||||||
|
foreach (var l in deltas.Take(deltas.Count() - keep_delta_count))
|
||||||
|
{
|
||||||
|
write($"- Removing old delta {l.Filename}", ConsoleColor.Yellow);
|
||||||
|
File.Delete(Path.Combine(ReleasesFolder, l.Filename));
|
||||||
|
releaseLines.Remove(l);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var lines = new List<string>();
|
||||||
|
releaseLines.ForEach(l => lines.Add(l.ToString()));
|
||||||
|
File.WriteAllLines(Path.Combine(ReleasesFolder, "RELEASES"), lines);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void uploadBuild(string version)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(GitHubAccessToken) || string.IsNullOrEmpty(codeSigningCertPath))
|
||||||
|
return;
|
||||||
|
|
||||||
|
write("Publishing to GitHub...");
|
||||||
|
|
||||||
|
write($"- Creating release {version}...", ConsoleColor.Yellow);
|
||||||
|
var req = new JsonWebRequest<GitHubRelease>($"{GitHubApiEndpoint}")
|
||||||
|
{
|
||||||
|
Method = HttpMethod.POST
|
||||||
|
};
|
||||||
|
req.AddRaw(JsonConvert.SerializeObject(new GitHubRelease
|
||||||
|
{
|
||||||
|
Name = version,
|
||||||
|
Draft = true,
|
||||||
|
PreRelease = true
|
||||||
|
}));
|
||||||
|
req.AuthenticatedBlockingPerform();
|
||||||
|
|
||||||
|
var assetUploadUrl = req.ResponseObject.UploadUrl.Replace("{?name,label}", "?name={0}");
|
||||||
|
foreach (var a in Directory.GetFiles(ReleasesFolder).Reverse()) //reverse to upload RELEASES first.
|
||||||
|
{
|
||||||
|
write($"- Adding asset {a}...", ConsoleColor.Yellow);
|
||||||
|
var upload = new WebRequest(assetUploadUrl, Path.GetFileName(a))
|
||||||
|
{
|
||||||
|
Method = HttpMethod.POST,
|
||||||
|
ContentType = "application/octet-stream",
|
||||||
|
};
|
||||||
|
|
||||||
|
upload.AddRaw(File.ReadAllBytes(a));
|
||||||
|
upload.AuthenticatedBlockingPerform();
|
||||||
|
}
|
||||||
|
|
||||||
|
openGitHubReleasePage();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void openGitHubReleasePage() => Process.Start(GitHubReleasePage);
|
||||||
|
|
||||||
|
private static void checkGitHubReleases()
|
||||||
|
{
|
||||||
|
write("Checking GitHub releases...");
|
||||||
|
var req = new JsonWebRequest<List<GitHubRelease>>($"{GitHubApiEndpoint}");
|
||||||
|
req.AuthenticatedBlockingPerform();
|
||||||
|
|
||||||
|
var lastRelease = req.ResponseObject.FirstOrDefault();
|
||||||
|
|
||||||
|
if (lastRelease == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (lastRelease.Draft)
|
||||||
|
{
|
||||||
|
openGitHubReleasePage();
|
||||||
|
error("There's a pending draft release! You probably don't want to push a build with this present.");
|
||||||
|
}
|
||||||
|
|
||||||
|
//there's a previous release for this project.
|
||||||
|
var assetReq = new JsonWebRequest<List<GitHubObject>>($"{GitHubApiEndpoint}/{lastRelease.Id}/assets");
|
||||||
|
assetReq.AuthenticatedBlockingPerform();
|
||||||
|
var assets = assetReq.ResponseObject;
|
||||||
|
|
||||||
|
//make sure our RELEASES file is the same as the last build on the server.
|
||||||
|
var releaseAsset = assets.FirstOrDefault(a => a.Name == "RELEASES");
|
||||||
|
|
||||||
|
//if we don't have a RELEASES asset then the previous release likely wasn't a Squirrel one.
|
||||||
|
if (releaseAsset == null) return;
|
||||||
|
|
||||||
|
write($"Last GitHub release was {lastRelease.Name}.");
|
||||||
|
|
||||||
|
bool requireDownload = false;
|
||||||
|
|
||||||
|
if (!File.Exists(Path.Combine(ReleasesFolder, nupkgDistroFilename(lastRelease.Name))))
|
||||||
|
{
|
||||||
|
write("Last verion's package not found locally.", ConsoleColor.Red);
|
||||||
|
requireDownload = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var lastReleases = new RawFileWebRequest($"{GitHubApiEndpoint}/assets/{releaseAsset.Id}");
|
||||||
|
lastReleases.AuthenticatedBlockingPerform();
|
||||||
|
if (File.ReadAllText(Path.Combine(ReleasesFolder, "RELEASES")) != lastReleases.ResponseString)
|
||||||
|
{
|
||||||
|
write("Server's RELEASES differed from ours.", ConsoleColor.Red);
|
||||||
|
requireDownload = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!requireDownload) return;
|
||||||
|
|
||||||
|
write("Refreshing local releases directory...");
|
||||||
|
refreshDirectory(ReleasesFolder);
|
||||||
|
|
||||||
|
foreach (var a in assets)
|
||||||
|
{
|
||||||
|
write($"- Downloading {a.Name}...", ConsoleColor.Yellow);
|
||||||
|
new FileWebRequest(Path.Combine(ReleasesFolder, a.Name), $"{GitHubApiEndpoint}/assets/{a.Id}").AuthenticatedBlockingPerform();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void refreshDirectory(string directory)
|
||||||
|
{
|
||||||
|
if (Directory.Exists(directory))
|
||||||
|
Directory.Delete(directory, true);
|
||||||
|
Directory.CreateDirectory(directory);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void updateAssemblyInfo(string version)
|
||||||
|
{
|
||||||
|
string file = Path.Combine(ProjectName, "Properties", "AssemblyInfo.cs");
|
||||||
|
|
||||||
|
var l1 = File.ReadAllLines(file);
|
||||||
|
List<string> l2 = new List<string>();
|
||||||
|
foreach (var l in l1)
|
||||||
|
{
|
||||||
|
if (l.StartsWith("[assembly: AssemblyVersion("))
|
||||||
|
l2.Add($"[assembly: AssemblyVersion(\"{version}\")]");
|
||||||
|
else if (l.StartsWith("[assembly: AssemblyFileVersion("))
|
||||||
|
l2.Add($"[assembly: AssemblyFileVersion(\"{version}\")]");
|
||||||
|
else
|
||||||
|
l2.Add(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
File.WriteAllLines(file, l2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Find the base path of the active solution (git checkout location)
|
||||||
|
/// </summary>
|
||||||
|
private static void findSolutionPath()
|
||||||
|
{
|
||||||
|
string path = Path.GetDirectoryName(Environment.CommandLine.Replace("\"", "").Trim());
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(path))
|
||||||
|
path = Environment.CurrentDirectory;
|
||||||
|
|
||||||
|
while (!File.Exists(Path.Combine(path, $"{SolutionName}.sln")))
|
||||||
|
path = path.Remove(path.LastIndexOf('\\'));
|
||||||
|
path += "\\";
|
||||||
|
|
||||||
|
Environment.CurrentDirectory = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool runCommand(string command, string args)
|
||||||
|
{
|
||||||
|
var psi = new ProcessStartInfo(command, args)
|
||||||
|
{
|
||||||
|
WorkingDirectory = solutionPath,
|
||||||
|
CreateNoWindow = true,
|
||||||
|
RedirectStandardOutput = true,
|
||||||
|
UseShellExecute = false,
|
||||||
|
WindowStyle = ProcessWindowStyle.Hidden
|
||||||
|
};
|
||||||
|
|
||||||
|
Process p = Process.Start(psi);
|
||||||
|
string output = p.StandardOutput.ReadToEnd();
|
||||||
|
if (p.ExitCode == 0) return true;
|
||||||
|
|
||||||
|
write(output);
|
||||||
|
error($"Command {command} {args} failed!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string readLineMasked()
|
||||||
|
{
|
||||||
|
var fg = Console.ForegroundColor;
|
||||||
|
Console.ForegroundColor = Console.BackgroundColor;
|
||||||
|
var ret = Console.ReadLine();
|
||||||
|
Console.ForegroundColor = fg;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void error(string message)
|
||||||
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
|
Console.WriteLine($"FATAL ERROR: {message}");
|
||||||
|
|
||||||
|
Console.ReadLine();
|
||||||
|
Environment.Exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void write(string message, ConsoleColor col = ConsoleColor.Gray)
|
||||||
|
{
|
||||||
|
if (sw.ElapsedMilliseconds > 0)
|
||||||
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.Green;
|
||||||
|
Console.Write(sw.ElapsedMilliseconds.ToString().PadRight(8));
|
||||||
|
}
|
||||||
|
Console.ForegroundColor = col;
|
||||||
|
Console.WriteLine(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AuthenticatedBlockingPerform(this WebRequest r)
|
||||||
|
{
|
||||||
|
r.AddHeader("Authorization", $"token {GitHubAccessToken}");
|
||||||
|
r.BlockingPerform();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class RawFileWebRequest : WebRequest
|
||||||
|
{
|
||||||
|
public RawFileWebRequest(string url) : base(url)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override HttpWebRequest CreateWebRequest(string requestString = null)
|
||||||
|
{
|
||||||
|
var req = base.CreateWebRequest(requestString);
|
||||||
|
req.Accept = "application/octet-stream";
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class ReleaseLine
|
||||||
|
{
|
||||||
|
public string Hash;
|
||||||
|
public string Filename;
|
||||||
|
public int Filesize;
|
||||||
|
|
||||||
|
public ReleaseLine(string line)
|
||||||
|
{
|
||||||
|
var split = line.Split(' ');
|
||||||
|
Hash = split[0];
|
||||||
|
Filename = split[1];
|
||||||
|
Filesize = int.Parse(split[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{Hash} {Filename} {Filesize}";
|
||||||
|
}
|
||||||
|
}
|
36
osu.Desktop.Deploy/Properties/AssemblyInfo.cs
Normal file
36
osu.Desktop.Deploy/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("osu.Desktop.Deploy")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("osu.Desktop.Deploy")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("baea2f74-0315-4667-84e0-acac0b4bf785")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// 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("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
125
osu.Desktop.Deploy/osu.Desktop.Deploy.csproj
Normal file
125
osu.Desktop.Deploy/osu.Desktop.Deploy.csproj
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{BAEA2F74-0315-4667-84E0-ACAC0B4BF785}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>osu.Desktop.Deploy</RootNamespace>
|
||||||
|
<AssemblyName>osu.Desktop.Deploy</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<StartupObject>osu.Desktop.Deploy.Program</StartupObject>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="DeltaCompressionDotNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1d14d6e5194e7f4a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DeltaCompressionDotNet.MsDelta, Version=1.0.0.0, Culture=neutral, PublicKeyToken=46b2138a390abf55, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.MsDelta.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DeltaCompressionDotNet.PatchApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3e8888ee913ed789, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.PatchApi.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\squirrel.windows.1.5.2\lib\Net45\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Mono.Cecil.Mdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Mdb.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Mono.Cecil.Pdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Pdb.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Mono.Cecil.Rocks, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Rocks.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="NuGet.Squirrel, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\squirrel.windows.1.5.2\lib\Net45\NuGet.Squirrel.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Squirrel, Version=1.5.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\squirrel.windows.1.5.2\lib\Net45\Squirrel.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="GitHubObject.cs" />
|
||||||
|
<Compile Include="GitHubRelease.cs" />
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\osu-framework\osu.Framework.Desktop\osu.Framework.Desktop.csproj">
|
||||||
|
<Project>{65dc628f-a640-4111-ab35-3a5652bc1e17}</Project>
|
||||||
|
<Name>osu.Framework.Desktop</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj">
|
||||||
|
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
|
||||||
|
<Name>osu.Framework</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
9
osu.Desktop.Deploy/packages.config
Normal file
9
osu.Desktop.Deploy/packages.config
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="DeltaCompressionDotNet" version="1.0.0" targetFramework="net452" />
|
||||||
|
<package id="Mono.Cecil" version="0.9.6.1" targetFramework="net452" />
|
||||||
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
|
||||||
|
<package id="NuGet.CommandLine" version="3.5.0" targetFramework="net452" developmentDependency="true" />
|
||||||
|
<package id="Splat" version="1.6.2" targetFramework="net452" />
|
||||||
|
<package id="squirrel.windows" version="1.5.2" targetFramework="net452" />
|
||||||
|
</packages>
|
@ -1,4 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
@ -100,6 +100,9 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="..\osu.licenseheader">
|
||||||
|
<Link>osu.licenseheader</Link>
|
||||||
|
</None>
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
-->
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||||
<package id="NUnit" version="3.5.0" targetFramework="net45" />
|
<package id="NUnit" version="3.5.0" targetFramework="net45" />
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
||||||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
||||||
|
@ -1,18 +1,23 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 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;
|
using osu.Framework;
|
||||||
using osu.Framework.GameModes.Testing;
|
using osu.Framework.GameModes.Testing;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
using osu.Game.Modes.Objects.Drawables;
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
using osu.Game.Modes.Osu.Objects;
|
using osu.Game.Modes.Osu.Objects;
|
||||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
@ -20,44 +25,124 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
public override string Name => @"Hit Objects";
|
public override string Name => @"Hit Objects";
|
||||||
|
|
||||||
|
private StopwatchClock rateAdjustClock;
|
||||||
|
private FramedClock framedClock;
|
||||||
|
|
||||||
|
bool auto = false;
|
||||||
|
|
||||||
public TestCaseHitObjects()
|
public TestCaseHitObjects()
|
||||||
{
|
{
|
||||||
var swClock = new StopwatchClock(true) { Rate = 0.2f };
|
rateAdjustClock = new StopwatchClock(true);
|
||||||
Clock = new FramedClock(swClock);
|
framedClock = new FramedClock(rateAdjustClock);
|
||||||
|
playbackSpeed.ValueChanged += delegate { rateAdjustClock.Rate = playbackSpeed.Value; };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Reset()
|
HitObjectType mode = HitObjectType.Spinner;
|
||||||
|
|
||||||
|
BindableNumber<double> playbackSpeed = new BindableDouble(0.5) { MinValue = 0, MaxValue = 1 };
|
||||||
|
private Container playfieldContainer;
|
||||||
|
private Container approachContainer;
|
||||||
|
|
||||||
|
private void load(HitObjectType mode)
|
||||||
{
|
{
|
||||||
base.Reset();
|
this.mode = mode;
|
||||||
|
|
||||||
Clock.ProcessFrame();
|
|
||||||
|
|
||||||
Container approachContainer = new Container { Depth = float.MinValue, };
|
|
||||||
|
|
||||||
Add(approachContainer);
|
|
||||||
|
|
||||||
|
switch (mode)
|
||||||
|
{
|
||||||
|
case HitObjectType.Circle:
|
||||||
const int count = 10;
|
const int count = 10;
|
||||||
|
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
var h = new HitCircle
|
var h = new HitCircle
|
||||||
{
|
{
|
||||||
StartTime = Clock.CurrentTime + 600 + i * 80,
|
StartTime = framedClock.CurrentTime + 600 + i * 80,
|
||||||
Position = new Vector2((i - count / 2) * 14),
|
Position = new Vector2((i - count / 2) * 14),
|
||||||
};
|
};
|
||||||
|
|
||||||
DrawableHitCircle d = new DrawableHitCircle(h)
|
add(new DrawableHitCircle(h));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HitObjectType.Slider:
|
||||||
|
add(new DrawableSlider(new Slider
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
StartTime = framedClock.CurrentTime + 600,
|
||||||
Depth = i,
|
ControlPoints = new List<Vector2>()
|
||||||
State = ArmedState.Hit,
|
{
|
||||||
Judgement = new OsuJudgementInfo { Result = HitResult.Hit }
|
new Vector2(-200, 0),
|
||||||
|
new Vector2(400, 0),
|
||||||
|
},
|
||||||
|
Length = 400,
|
||||||
|
Position = new Vector2(-200, 0),
|
||||||
|
Velocity = 1,
|
||||||
|
}));
|
||||||
|
break;
|
||||||
|
case HitObjectType.Spinner:
|
||||||
|
add(new DrawableSpinner(new Spinner
|
||||||
|
{
|
||||||
|
StartTime = framedClock.CurrentTime + 600,
|
||||||
|
Length = 1000,
|
||||||
|
Position = new Vector2(0, 0),
|
||||||
|
}));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Reset()
|
||||||
|
{
|
||||||
|
base.Reset();
|
||||||
|
|
||||||
|
playbackSpeed.TriggerChange();
|
||||||
|
|
||||||
|
AddButton(@"circles", () => load(HitObjectType.Circle));
|
||||||
|
AddButton(@"slider", () => load(HitObjectType.Slider));
|
||||||
|
AddButton(@"spinner", () => load(HitObjectType.Spinner));
|
||||||
|
|
||||||
|
AddToggle(@"auto", () => { auto = !auto; load(mode); });
|
||||||
|
|
||||||
|
ButtonsContainer.Add(new SpriteText { Text = "Playback Speed" });
|
||||||
|
ButtonsContainer.Add(new BasicSliderBar<double>
|
||||||
|
{
|
||||||
|
Width = 150,
|
||||||
|
Height = 10,
|
||||||
|
SelectionColor = Color4.Orange,
|
||||||
|
Bindable = playbackSpeed
|
||||||
|
});
|
||||||
|
|
||||||
|
framedClock.ProcessFrame();
|
||||||
|
|
||||||
|
var clockAdjustContainer = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Clock = framedClock,
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
playfieldContainer = new Container { RelativeSizeAxes = Axes.Both },
|
||||||
|
approachContainer = new Container { RelativeSizeAxes = Axes.Both }
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Add(clockAdjustContainer);
|
||||||
|
|
||||||
approachContainer.Add(d.ApproachCircle.CreateProxy());
|
load(mode);
|
||||||
Add(d);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int depth;
|
||||||
|
void add(DrawableHitObject h)
|
||||||
|
{
|
||||||
|
h.Anchor = Anchor.Centre;
|
||||||
|
h.Depth = depth++;
|
||||||
|
|
||||||
|
if (auto)
|
||||||
|
{
|
||||||
|
h.State = ArmedState.Hit;
|
||||||
|
h.Judgement = new OsuJudgementInfo { Result = HitResult.Hit };
|
||||||
|
}
|
||||||
|
|
||||||
|
playfieldContainer.Add(h);
|
||||||
|
var proxyable = h as IDrawableHitObjectWithProxiedApproach;
|
||||||
|
if (proxyable != null)
|
||||||
|
approachContainer.Add(proxyable.ProxiedLayer.CreateProxy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,6 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
progressingNotifications.Clear();
|
progressingNotifications.Clear();
|
||||||
|
|
||||||
AddInternal(new BackgroundModeDefault() { Depth = 10 });
|
|
||||||
|
|
||||||
Content.Add(manager = new NotificationManager
|
Content.Add(manager = new NotificationManager
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
|
@ -11,6 +11,7 @@ using System.Reflection;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Screens.Backgrounds;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests
|
namespace osu.Desktop.VisualTests
|
||||||
{
|
{
|
||||||
@ -20,6 +21,8 @@ namespace osu.Desktop.VisualTests
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
|
(new BackgroundModeDefault() { Depth = 10 }).Preload(this, AddInternal);
|
||||||
|
|
||||||
// Have to construct this here, rather than in the constructor, because
|
// Have to construct this here, rather than in the constructor, because
|
||||||
// we depend on some dependencies to be loaded within OsuGameBase.load().
|
// we depend on some dependencies to be loaded within OsuGameBase.load().
|
||||||
Add(new TestBrowser());
|
Add(new TestBrowser());
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
<packages>
|
<packages>
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
using osu.Framework.Allocation;
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.Diagnostics;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
@ -6,6 +10,11 @@ using osu.Game.Overlays;
|
|||||||
using osu.Game.Overlays.Notifications;
|
using osu.Game.Overlays.Notifications;
|
||||||
using Squirrel;
|
using Squirrel;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Graphics.Textures;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Desktop.Overlays
|
namespace osu.Desktop.Overlays
|
||||||
{
|
{
|
||||||
@ -14,20 +23,77 @@ namespace osu.Desktop.Overlays
|
|||||||
private UpdateManager updateManager;
|
private UpdateManager updateManager;
|
||||||
private NotificationManager notification;
|
private NotificationManager notification;
|
||||||
|
|
||||||
|
protected override bool HideOnEscape => false;
|
||||||
|
|
||||||
|
public override bool HandleInput => false;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(NotificationManager notification)
|
private void load(NotificationManager notification, OsuColour colours, TextureStore textures)
|
||||||
{
|
{
|
||||||
this.notification = notification;
|
this.notification = notification;
|
||||||
|
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Anchor = Anchor.BottomCentre;
|
Anchor = Anchor.BottomCentre;
|
||||||
Origin = Anchor.BottomCentre;
|
Origin = Anchor.BottomCentre;
|
||||||
|
Alpha = 0;
|
||||||
|
|
||||||
|
bool isDebug = false;
|
||||||
|
Debug.Assert(isDebug = true);
|
||||||
|
|
||||||
var asm = Assembly.GetEntryAssembly().GetName();
|
var asm = Assembly.GetEntryAssembly().GetName();
|
||||||
Add(new OsuSpriteText
|
string version;
|
||||||
|
if (asm.Version.Major == 0)
|
||||||
{
|
{
|
||||||
Text = $@"osu!lazer v{asm.Version}"
|
version = @"local " + (isDebug ? @"debug" : @"release");
|
||||||
});
|
}
|
||||||
|
else
|
||||||
|
version = $@"{asm.Version.Major}.{asm.Version.Minor}.{asm.Version.Build}";
|
||||||
|
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new FlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FlowDirections.Vertical,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new FlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FlowDirections.Horizontal,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Spacing = new Vector2(5),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Font = @"Exo2.0-Bold",
|
||||||
|
Text = $@"osu!lazer"
|
||||||
|
},
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Colour = isDebug ? colours.Red : Color4.White,
|
||||||
|
Text = version
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
TextSize = 12,
|
||||||
|
Colour = colours.Yellow,
|
||||||
|
Font = @"Venera",
|
||||||
|
Text = $@"Development Build"
|
||||||
|
},
|
||||||
|
new Sprite
|
||||||
|
{
|
||||||
|
Texture = textures.Get(@"Menu/dev-build-footer"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
updateChecker();
|
updateChecker();
|
||||||
}
|
}
|
||||||
@ -75,6 +141,7 @@ namespace osu.Desktop.Overlays
|
|||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
|
FadeIn(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
using System.Reflection;
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
@ -22,5 +25,5 @@ using System.Runtime.InteropServices;
|
|||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
[assembly: Guid("55e28cb2-7b6c-4595-8dcc-9871d8aad7e9")]
|
[assembly: Guid("55e28cb2-7b6c-4595-8dcc-9871d8aad7e9")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.0.5")]
|
[assembly: AssemblyVersion("0.0.0")]
|
||||||
[assembly: AssemblyFileVersion("0.0.5")]
|
[assembly: AssemblyFileVersion("0.0.0")]
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
25
osu.Desktop/osu.nuspec
Normal file
25
osu.Desktop/osu.nuspec
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
|
<metadata>
|
||||||
|
<id>osulazer</id>
|
||||||
|
<version>0.0.0</version>
|
||||||
|
<title>osulazer</title>
|
||||||
|
<authors>ppy Pty Ltd</authors>
|
||||||
|
<owners>Dean Herbert</owners>
|
||||||
|
<projectUrl>https://osu.ppy.sh/</projectUrl>
|
||||||
|
<iconUrl>https://puu.sh/tYyXZ/9a01a5d1b0.ico</iconUrl>
|
||||||
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
|
<description>click the circles. to the beat.</description>
|
||||||
|
<summary>click the circles.</summary>
|
||||||
|
<releaseNotes>testing</releaseNotes>
|
||||||
|
<copyright>Copyright ppy Pty Ltd 2007-2017</copyright>
|
||||||
|
<language>en-AU</language>
|
||||||
|
</metadata>
|
||||||
|
<files>
|
||||||
|
<file src="*.exe" target="lib\net45\" exclude="**vshost**"/>
|
||||||
|
<file src="*.dll" target="lib\net45\"/>
|
||||||
|
<file src="x86\*.dll" target="lib\net45\x86\"/>
|
||||||
|
<file src="x64\*.dll" target="lib\net45\x64\"/>
|
||||||
|
</files>
|
||||||
|
</package>
|
||||||
|
|
@ -1,4 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
-->
|
||||||
<packages>
|
<packages>
|
||||||
<package id="DeltaCompressionDotNet" version="1.0.0" targetFramework="net45" />
|
<package id="DeltaCompressionDotNet" version="1.0.0" targetFramework="net45" />
|
||||||
<package id="Mono.Cecil" version="0.9.6.1" targetFramework="net45" />
|
<package id="Mono.Cecil" version="0.9.6.1" targetFramework="net45" />
|
||||||
|
@ -24,6 +24,6 @@ namespace osu.Game.Modes.Catch
|
|||||||
|
|
||||||
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount) => null;
|
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount) => null;
|
||||||
|
|
||||||
public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser();
|
public override HitObjectParser CreateHitObjectParser() => new NullHitObjectParser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
||||||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<packages>
|
<packages>
|
||||||
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
|
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -25,6 +25,6 @@ namespace osu.Game.Modes.Mania
|
|||||||
|
|
||||||
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount) => null;
|
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount) => null;
|
||||||
|
|
||||||
public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser();
|
public override HitObjectParser CreateHitObjectParser() => new NullHitObjectParser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
||||||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<packages>
|
<packages>
|
||||||
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
|
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -2,7 +2,6 @@
|
|||||||
// 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;
|
||||||
using System.ComponentModel;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
using osu.Game.Modes.Objects.Drawables;
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
@ -11,9 +10,9 @@ using OpenTK;
|
|||||||
|
|
||||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||||
{
|
{
|
||||||
public class DrawableHitCircle : DrawableOsuHitObject
|
public class DrawableHitCircle : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
|
||||||
{
|
{
|
||||||
private HitCircle osuObject;
|
private OsuHitObject osuObject;
|
||||||
|
|
||||||
public ApproachCircle ApproachCircle;
|
public ApproachCircle ApproachCircle;
|
||||||
private CirclePiece circle;
|
private CirclePiece circle;
|
||||||
@ -23,11 +22,12 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
private NumberPiece number;
|
private NumberPiece number;
|
||||||
private GlowPiece glow;
|
private GlowPiece glow;
|
||||||
|
|
||||||
public DrawableHitCircle(HitCircle h) : base(h)
|
public DrawableHitCircle(OsuHitObject h) : base(h)
|
||||||
{
|
{
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
osuObject = h;
|
osuObject = h;
|
||||||
|
|
||||||
Origin = Anchor.Centre;
|
|
||||||
Position = osuObject.StackedPosition;
|
Position = osuObject.StackedPosition;
|
||||||
Scale = new Vector2(osuObject.Scale);
|
Scale = new Vector2(osuObject.Scale);
|
||||||
|
|
||||||
@ -156,5 +156,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Drawable ProxiedLayer => ApproachCircle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
using osu.Game.Modes.Objects.Drawables;
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Modes.Objects.Drawables;
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
using osu.Game.Modes.Osu.Objects.Drawables.Pieces;
|
using osu.Game.Modes.Osu.Objects.Drawables.Pieces;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -11,7 +10,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||||
{
|
{
|
||||||
class DrawableSlider : DrawableOsuHitObject
|
public class DrawableSlider : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
|
||||||
{
|
{
|
||||||
private Slider slider;
|
private Slider slider;
|
||||||
|
|
||||||
@ -157,6 +156,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
|
|
||||||
FadeOut(800);
|
FadeOut(800);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Drawable ProxiedLayer => initialCircle.ApproachCircle;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal interface ISliderProgress
|
internal interface ISliderProgress
|
||||||
|
140
osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs
Normal file
140
osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Transformations;
|
||||||
|
using osu.Framework.MathUtils;
|
||||||
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
|
using osu.Game.Modes.Osu.Objects.Drawables.Pieces;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||||
|
{
|
||||||
|
public class DrawableSpinner : DrawableOsuHitObject
|
||||||
|
{
|
||||||
|
private Spinner spinner;
|
||||||
|
|
||||||
|
private SpinnerDisc disc;
|
||||||
|
private SpinnerBackground background;
|
||||||
|
private DrawableHitCircle circle;
|
||||||
|
private NumberPiece number;
|
||||||
|
|
||||||
|
public DrawableSpinner(Spinner s) : base(s)
|
||||||
|
{
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
Position = s.Position;
|
||||||
|
|
||||||
|
//take up full playfield.
|
||||||
|
Size = new Vector2(512);
|
||||||
|
|
||||||
|
spinner = s;
|
||||||
|
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
background = new SpinnerBackground
|
||||||
|
{
|
||||||
|
Alpha = 0,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
DiscColour = Color4.Black
|
||||||
|
},
|
||||||
|
disc = new SpinnerDisc
|
||||||
|
{
|
||||||
|
Alpha = 0,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
DiscColour = s.Colour
|
||||||
|
},
|
||||||
|
circle = new DrawableHitCircle(s)
|
||||||
|
{
|
||||||
|
Interactive = false,
|
||||||
|
Position = Vector2.Zero,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
circle.ApproachCircle.Colour = Color4.Transparent;
|
||||||
|
|
||||||
|
background.Scale = scaleToCircle;
|
||||||
|
disc.Scale = scaleToCircle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Contains(Vector2 screenSpacePos) => true;
|
||||||
|
|
||||||
|
protected override void CheckJudgement(bool userTriggered)
|
||||||
|
{
|
||||||
|
if (Time.Current < HitObject.StartTime) return;
|
||||||
|
|
||||||
|
var j = Judgement as OsuJudgementInfo;
|
||||||
|
|
||||||
|
disc.ScaleTo(Interpolation.ValueAt(Math.Sqrt(Progress), scaleToCircle, Vector2.One, 0, 1), 100);
|
||||||
|
|
||||||
|
if (!userTriggered && Time.Current >= HitObject.EndTime)
|
||||||
|
{
|
||||||
|
if (Progress >= 1)
|
||||||
|
{
|
||||||
|
j.Score = OsuScoreResult.Hit300;
|
||||||
|
j.Result = HitResult.Hit;
|
||||||
|
}
|
||||||
|
else if (Progress > .9)
|
||||||
|
{
|
||||||
|
j.Score = OsuScoreResult.Hit100;
|
||||||
|
j.Result = HitResult.Hit;
|
||||||
|
}
|
||||||
|
else if (Progress > .75)
|
||||||
|
{
|
||||||
|
j.Score = OsuScoreResult.Hit50;
|
||||||
|
j.Result = HitResult.Hit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
j.Score = OsuScoreResult.Miss;
|
||||||
|
j.Result = HitResult.Miss;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector2 scaleToCircle => new Vector2(circle.Scale * circle.DrawWidth / DrawWidth) * 0.95f;
|
||||||
|
|
||||||
|
private float spinsPerMinuteNeeded = 100 + (5 * 15); //TODO: read per-map OD and place it on the 5
|
||||||
|
|
||||||
|
private float rotationsNeeded => (float)(spinsPerMinuteNeeded * (spinner.EndTime - spinner.StartTime) / 60000f);
|
||||||
|
|
||||||
|
public float Progress => MathHelper.Clamp(disc.RotationAbsolute / 360 / rotationsNeeded, 0, 1);
|
||||||
|
|
||||||
|
protected override void UpdatePreemptState()
|
||||||
|
{
|
||||||
|
base.UpdatePreemptState();
|
||||||
|
|
||||||
|
FadeIn(200);
|
||||||
|
|
||||||
|
background.Delay(TIME_PREEMPT - 100);
|
||||||
|
background.FadeIn(200);
|
||||||
|
background.ScaleTo(1, 200, EasingTypes.OutQuint);
|
||||||
|
|
||||||
|
disc.Delay(TIME_PREEMPT - 50);
|
||||||
|
disc.FadeIn(200);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void UpdateState(ArmedState state)
|
||||||
|
{
|
||||||
|
base.UpdateState(state);
|
||||||
|
|
||||||
|
Delay(HitObject.Duration, true);
|
||||||
|
|
||||||
|
FadeOut(160);
|
||||||
|
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case ArmedState.Hit:
|
||||||
|
ScaleTo(Scale * 1.2f, 320, EasingTypes.Out);
|
||||||
|
break;
|
||||||
|
case ArmedState.Miss:
|
||||||
|
ScaleTo(Scale * 0.8f, 320, EasingTypes.In);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||||
|
{
|
||||||
|
public class SpinnerBackground : SpinnerDisc
|
||||||
|
{
|
||||||
|
public override bool HandleInput => false;
|
||||||
|
}
|
||||||
|
}
|
168
osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs
Normal file
168
osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Colour;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Graphics.Transformations;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
using osu.Framework.Logging;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||||
|
{
|
||||||
|
public class SpinnerDisc : CircularContainer
|
||||||
|
{
|
||||||
|
public override bool Contains(Vector2 screenSpacePos) => true;
|
||||||
|
|
||||||
|
protected Sprite Disc;
|
||||||
|
|
||||||
|
public SRGBColour DiscColour
|
||||||
|
{
|
||||||
|
get { return Disc.Colour; }
|
||||||
|
set { Disc.Colour = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
class SpinnerBorder : Container
|
||||||
|
{
|
||||||
|
public SpinnerBorder()
|
||||||
|
{
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
private int lastLayoutDotCount;
|
||||||
|
private void layout()
|
||||||
|
{
|
||||||
|
int count = (int)(MathHelper.Pi * ScreenSpaceDrawQuad.Width / 9);
|
||||||
|
|
||||||
|
if (count == lastLayoutDotCount) return;
|
||||||
|
|
||||||
|
lastLayoutDotCount = count;
|
||||||
|
|
||||||
|
while (Children.Count() < count)
|
||||||
|
{
|
||||||
|
Add(new CircularContainer
|
||||||
|
{
|
||||||
|
Colour = Color4.White,
|
||||||
|
RelativePositionAxes = Axes.Both,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Size = new Vector2(1 / ScreenSpaceDrawQuad.Width * 2000),
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var size = new Vector2(1 / ScreenSpaceDrawQuad.Width * 2000);
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
foreach (var d in Children)
|
||||||
|
{
|
||||||
|
d.Size = size;
|
||||||
|
d.Position = new Vector2(
|
||||||
|
0.5f + (float)Math.Sin((float)i / count * 2 * MathHelper.Pi) / 2,
|
||||||
|
0.5f + (float)Math.Cos((float)i / count * 2 * MathHelper.Pi) / 2
|
||||||
|
);
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
layout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpinnerDisc()
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
Disc = new Box
|
||||||
|
{
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Alpha = 0.2f,
|
||||||
|
},
|
||||||
|
new SpinnerBorder()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
bool tracking;
|
||||||
|
public bool Tracking
|
||||||
|
{
|
||||||
|
get { return tracking; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value == tracking) return;
|
||||||
|
|
||||||
|
tracking = value;
|
||||||
|
|
||||||
|
Disc.FadeTo(tracking ? 0.5f : 0.2f, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
|
{
|
||||||
|
Tracking = true;
|
||||||
|
return base.OnMouseDown(state, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||||
|
{
|
||||||
|
Tracking = false;
|
||||||
|
return base.OnMouseUp(state, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnMouseMove(InputState state)
|
||||||
|
{
|
||||||
|
Tracking |= state.Mouse.HasMainButtonPressed;
|
||||||
|
mousePosition = state.Mouse.Position;
|
||||||
|
return base.OnMouseMove(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector2 mousePosition;
|
||||||
|
|
||||||
|
private float lastAngle;
|
||||||
|
private float currentRotation;
|
||||||
|
public float RotationAbsolute;
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
|
||||||
|
var thisAngle = -(float)MathHelper.RadiansToDegrees(Math.Atan2(mousePosition.X - DrawSize.X / 2, mousePosition.Y - DrawSize.Y / 2));
|
||||||
|
if (tracking)
|
||||||
|
{
|
||||||
|
if (thisAngle - lastAngle > 180)
|
||||||
|
lastAngle += 360;
|
||||||
|
else if (lastAngle - thisAngle > 180)
|
||||||
|
lastAngle -= 360;
|
||||||
|
|
||||||
|
currentRotation += thisAngle - lastAngle;
|
||||||
|
RotationAbsolute += Math.Abs(thisAngle - lastAngle);
|
||||||
|
}
|
||||||
|
lastAngle = thisAngle;
|
||||||
|
|
||||||
|
RotateTo(currentRotation, 100, EasingTypes.OutExpo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -31,9 +31,10 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
|
|
||||||
Scale = (1.0f - 0.7f * (beatmap.BeatmapInfo.BaseDifficulty.CircleSize - 5) / 5) / 2;
|
Scale = (1.0f - 0.7f * (beatmap.BeatmapInfo.BaseDifficulty.CircleSize - 5) / 5) / 2;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
internal enum HitObjectType
|
public enum HitObjectType
|
||||||
{
|
{
|
||||||
Circle = 1,
|
Circle = 1,
|
||||||
Slider = 2,
|
Slider = 2,
|
||||||
@ -45,5 +46,4 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
Hold = 128,
|
Hold = 128,
|
||||||
ManiaLong = 128,
|
ManiaLong = 128,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -18,21 +18,22 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
public override HitObject Parse(string text)
|
public override HitObject Parse(string text)
|
||||||
{
|
{
|
||||||
string[] split = text.Split(',');
|
string[] split = text.Split(',');
|
||||||
var type = (OsuHitObject.HitObjectType)int.Parse(split[3]);
|
var type = (HitObjectType)int.Parse(split[3]);
|
||||||
bool combo = type.HasFlag(OsuHitObject.HitObjectType.NewCombo);
|
bool combo = type.HasFlag(HitObjectType.NewCombo);
|
||||||
type &= (OsuHitObject.HitObjectType)0xF;
|
type &= (HitObjectType)0xF;
|
||||||
type &= ~OsuHitObject.HitObjectType.NewCombo;
|
type &= ~HitObjectType.NewCombo;
|
||||||
OsuHitObject result;
|
OsuHitObject result;
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case OsuHitObject.HitObjectType.Circle:
|
case HitObjectType.Circle:
|
||||||
result = new HitCircle();
|
result = new HitCircle
|
||||||
|
{
|
||||||
|
Position = new Vector2(int.Parse(split[0]), int.Parse(split[1]))
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case OsuHitObject.HitObjectType.Slider:
|
case HitObjectType.Slider:
|
||||||
Slider s = new Slider();
|
|
||||||
|
|
||||||
CurveTypes curveType = CurveTypes.Catmull;
|
CurveTypes curveType = CurveTypes.Catmull;
|
||||||
int repeatCount = 0;
|
int repeatCount;
|
||||||
double length = 0;
|
double length = 0;
|
||||||
List<Vector2> points = new List<Vector2>();
|
List<Vector2> points = new List<Vector2>();
|
||||||
|
|
||||||
@ -79,29 +80,28 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
if (split.Length > 7)
|
if (split.Length > 7)
|
||||||
length = Convert.ToDouble(split[7], CultureInfo.InvariantCulture);
|
length = Convert.ToDouble(split[7], CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
s.RepeatCount = repeatCount;
|
result = new Slider
|
||||||
|
|
||||||
s.Curve = new SliderCurve
|
|
||||||
{
|
{
|
||||||
ControlPoints = points,
|
ControlPoints = points,
|
||||||
Length = length,
|
Length = length,
|
||||||
CurveType = curveType
|
CurveType = curveType,
|
||||||
|
RepeatCount = repeatCount,
|
||||||
|
Position = new Vector2(int.Parse(split[0]), int.Parse(split[1]))
|
||||||
};
|
};
|
||||||
|
|
||||||
s.Curve.Calculate();
|
|
||||||
|
|
||||||
result = s;
|
|
||||||
break;
|
break;
|
||||||
case OsuHitObject.HitObjectType.Spinner:
|
case HitObjectType.Spinner:
|
||||||
result = new Spinner();
|
result = new Spinner
|
||||||
|
{
|
||||||
|
Length = Convert.ToDouble(split[5], CultureInfo.InvariantCulture) - Convert.ToDouble(split[2], CultureInfo.InvariantCulture),
|
||||||
|
Position = new Vector2(512, 384) / 2,
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//throw new InvalidOperationException($@"Unknown hit object type {type}");
|
throw new InvalidOperationException($@"Unknown hit object type {type}");
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
result.Position = new Vector2(int.Parse(split[0]), int.Parse(split[1]));
|
result.StartTime = Convert.ToDouble(split[2], CultureInfo.InvariantCulture);
|
||||||
result.StartTime = double.Parse(split[2]);
|
result.Sample = new HitSampleInfo
|
||||||
result.Sample = new HitSampleInfo {
|
{
|
||||||
Type = (SampleType)int.Parse(split[4]),
|
Type = (SampleType)int.Parse(split[4]),
|
||||||
Set = SampleSet.Soft,
|
Set = SampleSet.Soft,
|
||||||
};
|
};
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 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 osu.Game.Beatmaps;
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using System.Collections.Generic;
|
using osu.Game.Beatmaps;
|
||||||
using System;
|
|
||||||
using osu.Game.Beatmaps.Samples;
|
using osu.Game.Beatmaps.Samples;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Osu.Objects
|
namespace osu.Game.Modes.Osu.Objects
|
||||||
{
|
{
|
||||||
@ -22,11 +22,28 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
stackHeight = value;
|
stackHeight = value;
|
||||||
if (Curve != null)
|
|
||||||
Curve.Offset = StackOffset;
|
Curve.Offset = StackOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Vector2> ControlPoints
|
||||||
|
{
|
||||||
|
get { return Curve.ControlPoints; }
|
||||||
|
set { Curve.ControlPoints = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Length
|
||||||
|
{
|
||||||
|
get { return Curve.Length; }
|
||||||
|
set { Curve.Length = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public CurveTypes CurveType
|
||||||
|
{
|
||||||
|
get { return Curve.CurveType; }
|
||||||
|
set { Curve.CurveType = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public double Velocity;
|
public double Velocity;
|
||||||
public double TickDistance;
|
public double TickDistance;
|
||||||
|
|
||||||
@ -43,9 +60,9 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
TickDistance = (100 * baseDifficulty.SliderMultiplier) / baseDifficulty.SliderTickRate / (multipliedStartBeatLength / startBeatLength);
|
TickDistance = (100 * baseDifficulty.SliderMultiplier) / baseDifficulty.SliderTickRate / (multipliedStartBeatLength / startBeatLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int RepeatCount;
|
public int RepeatCount = 1;
|
||||||
|
|
||||||
public SliderCurve Curve;
|
internal readonly SliderCurve Curve = new SliderCurve();
|
||||||
|
|
||||||
public IEnumerable<SliderTick> Ticks
|
public IEnumerable<SliderTick> Ticks
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
|
|
||||||
public List<Vector2> ControlPoints;
|
public List<Vector2> ControlPoints;
|
||||||
|
|
||||||
public CurveTypes CurveType;
|
public CurveTypes CurveType = CurveTypes.PerfectCurve;
|
||||||
|
|
||||||
public Vector2 Offset;
|
public Vector2 Offset;
|
||||||
|
|
||||||
@ -172,6 +172,9 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
/// <param name="p1">End progress. Ranges from 0 (beginning of the slider) to 1 (end of the slider).</param>
|
/// <param name="p1">End progress. Ranges from 0 (beginning of the slider) to 1 (end of the slider).</param>
|
||||||
public void GetPathToProgress(List<Vector2> path, double p0, double p1)
|
public void GetPathToProgress(List<Vector2> path, double p0, double p1)
|
||||||
{
|
{
|
||||||
|
if (calculatedPath.Count == 0 && ControlPoints.Count > 0)
|
||||||
|
Calculate();
|
||||||
|
|
||||||
double d0 = progressToDistance(p0);
|
double d0 = progressToDistance(p0);
|
||||||
double d1 = progressToDistance(p1);
|
double d1 = progressToDistance(p1);
|
||||||
|
|
||||||
@ -196,6 +199,9 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Vector2 PositionAt(double progress)
|
public Vector2 PositionAt(double progress)
|
||||||
{
|
{
|
||||||
|
if (calculatedPath.Count == 0 && ControlPoints.Count > 0)
|
||||||
|
Calculate();
|
||||||
|
|
||||||
double d = progressToDistance(progress);
|
double d = progressToDistance(progress);
|
||||||
return interpolateVertices(indexOfDistance(d), d) + Offset;
|
return interpolateVertices(indexOfDistance(d), d) + Offset;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 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 osu.Game.Beatmaps;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Osu.Objects
|
namespace osu.Game.Modes.Osu.Objects
|
||||||
{
|
{
|
||||||
public class Spinner : OsuHitObject
|
public class Spinner : OsuHitObject
|
||||||
{
|
{
|
||||||
|
public double Length;
|
||||||
|
|
||||||
|
public override double EndTime => StartTime + Length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
||||||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
||||||
|
@ -21,7 +21,8 @@ namespace osu.Game.Modes.Osu.UI
|
|||||||
return new DrawableHitCircle(h as HitCircle);
|
return new DrawableHitCircle(h as HitCircle);
|
||||||
if (h is Slider)
|
if (h is Slider)
|
||||||
return new DrawableSlider(h as Slider);
|
return new DrawableSlider(h as Slider);
|
||||||
|
if (h is Spinner)
|
||||||
|
return new DrawableSpinner(h as Spinner);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,10 +60,10 @@ namespace osu.Game.Modes.Osu.UI
|
|||||||
public override void Add(DrawableHitObject h)
|
public override void Add(DrawableHitObject h)
|
||||||
{
|
{
|
||||||
h.Depth = (float)h.HitObject.StartTime;
|
h.Depth = (float)h.HitObject.StartTime;
|
||||||
DrawableHitCircle c = h as DrawableHitCircle;
|
IDrawableHitObjectWithProxiedApproach c = h as IDrawableHitObjectWithProxiedApproach;
|
||||||
if (c != null)
|
if (c != null)
|
||||||
{
|
{
|
||||||
approachCircles.Add(c.ApproachCircle.CreateProxy());
|
approachCircles.Add(c.ProxiedLayer.CreateProxy());
|
||||||
}
|
}
|
||||||
|
|
||||||
h.OnJudgement += judgement;
|
h.OnJudgement += judgement;
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
@ -50,9 +50,11 @@
|
|||||||
<Compile Include="Objects\Drawables\SliderTicksRenderer.cs" />
|
<Compile Include="Objects\Drawables\SliderTicksRenderer.cs" />
|
||||||
<Compile Include="Objects\Drawables\Connections\FollowPointRenderer.cs" />
|
<Compile Include="Objects\Drawables\Connections\FollowPointRenderer.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\ApproachCircle.cs" />
|
<Compile Include="Objects\Drawables\Pieces\ApproachCircle.cs" />
|
||||||
|
<Compile Include="Objects\Drawables\Pieces\SpinnerBackground.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\CirclePiece.cs" />
|
<Compile Include="Objects\Drawables\Pieces\CirclePiece.cs" />
|
||||||
<Compile Include="Objects\Drawables\DrawableSlider.cs" />
|
<Compile Include="Objects\Drawables\DrawableSlider.cs" />
|
||||||
<Compile Include="Objects\Drawables\Connections\FollowPoint.cs" />
|
<Compile Include="Objects\Drawables\Connections\FollowPoint.cs" />
|
||||||
|
<Compile Include="Objects\Drawables\DrawableSpinner.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\ExplodePiece.cs" />
|
<Compile Include="Objects\Drawables\Pieces\ExplodePiece.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\FlashPiece.cs" />
|
<Compile Include="Objects\Drawables\Pieces\FlashPiece.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\GlowPiece.cs" />
|
<Compile Include="Objects\Drawables\Pieces\GlowPiece.cs" />
|
||||||
@ -61,6 +63,7 @@
|
|||||||
<Compile Include="Objects\Drawables\DrawableSliderTick.cs" />
|
<Compile Include="Objects\Drawables\DrawableSliderTick.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\RingPiece.cs" />
|
<Compile Include="Objects\Drawables\Pieces\RingPiece.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\SliderBouncer.cs" />
|
<Compile Include="Objects\Drawables\Pieces\SliderBouncer.cs" />
|
||||||
|
<Compile Include="Objects\Drawables\Pieces\SpinnerDisc.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\Triangles.cs" />
|
<Compile Include="Objects\Drawables\Pieces\Triangles.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\SliderBall.cs" />
|
<Compile Include="Objects\Drawables\Pieces\SliderBall.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\SliderBody.cs" />
|
<Compile Include="Objects\Drawables\Pieces\SliderBody.cs" />
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<packages>
|
<packages>
|
||||||
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net452" />
|
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
@ -1,8 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
||||||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
||||||
|
@ -25,6 +25,6 @@ namespace osu.Game.Modes.Taiko
|
|||||||
|
|
||||||
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount) => null;
|
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount) => null;
|
||||||
|
|
||||||
public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser();
|
public override HitObjectParser CreateHitObjectParser() => new NullHitObjectParser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<packages>
|
<packages>
|
||||||
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
|
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -1,4 +1,7 @@
|
|||||||
using System;
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
using System;
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// 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.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
using System;
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Game.Beatmaps.IO;
|
using osu.Game.Beatmaps.IO;
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
<!--
|
||||||
|
Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
||||||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
using System;
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
@ -55,6 +55,9 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="..\osu.licenseheader">
|
||||||
|
<Link>osu.licenseheader</Link>
|
||||||
|
</None>
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
<None Include="OpenTK.dll.config" />
|
<None Include="OpenTK.dll.config" />
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
-->
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NUnit" version="3.5.0" targetFramework="net45" />
|
<package id="NUnit" version="3.5.0" targetFramework="net45" />
|
||||||
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
|
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
|
||||||
|
@ -14,144 +14,148 @@ namespace osu.Game.Configuration
|
|||||||
{
|
{
|
||||||
#pragma warning disable CS0612 // Type or member is obsolete
|
#pragma warning disable CS0612 // Type or member is obsolete
|
||||||
|
|
||||||
Set(OsuConfig.MouseSpeed, 1.0);
|
|
||||||
|
|
||||||
Set(OsuConfig.Username, string.Empty);
|
Set(OsuConfig.Username, string.Empty);
|
||||||
Set(OsuConfig.Token, string.Empty);
|
Set(OsuConfig.Token, string.Empty);
|
||||||
|
|
||||||
Set(OsuConfig.PlayMode, PlayMode.Osu);
|
Set(OsuConfig.PlayMode, PlayMode.Osu);
|
||||||
|
|
||||||
Set(OsuConfig.BeatmapDirectory, @"Songs"); // TODO: use this
|
|
||||||
|
|
||||||
Set(OsuConfig.AllowPublicInvites, true);
|
|
||||||
Set(OsuConfig.AutoChatHide, true);
|
|
||||||
Set(OsuConfig.AutomaticDownload, true);
|
|
||||||
Set(OsuConfig.AutomaticDownloadNoVideo, false);
|
|
||||||
Set(OsuConfig.BlockNonFriendPM, false);
|
|
||||||
Set(OsuConfig.BloomSoftening, false);
|
|
||||||
Set(OsuConfig.BossKeyFirstActivation, true);
|
|
||||||
Set(OsuConfig.ChatAudibleHighlight, true);
|
|
||||||
Set(OsuConfig.ChatChannels, string.Empty);
|
|
||||||
Set(OsuConfig.ChatFilter, false);
|
|
||||||
Set(OsuConfig.ChatHighlightName, true);
|
|
||||||
Set(OsuConfig.ChatMessageNotification, true);
|
|
||||||
Set(OsuConfig.ChatLastChannel, string.Empty);
|
|
||||||
Set(OsuConfig.ChatRemoveForeign, false);
|
|
||||||
//Set(OsuConfig.ChatSortMode, UserSortMode.Rank);
|
|
||||||
Set(OsuConfig.ComboBurst, true);
|
|
||||||
Set(OsuConfig.ComboFire, false);
|
|
||||||
Set(OsuConfig.ComboFireHeight, 3);
|
|
||||||
Set(OsuConfig.ConfirmExit, false);
|
|
||||||
Set(OsuConfig.AutoSendNowPlaying, true);
|
|
||||||
Set(OsuConfig.CursorSize, 1.0, 0.5f, 2);
|
|
||||||
Set(OsuConfig.AutomaticCursorSizing, false);
|
|
||||||
Set(OsuConfig.DimLevel, 30, 0, 100);
|
|
||||||
Set(OsuConfig.Display, 1);
|
|
||||||
Set(OsuConfig.DisplayCityLocation, false);
|
|
||||||
Set(OsuConfig.DistanceSpacingEnabled, true);
|
|
||||||
Set(OsuConfig.EditorTip, 0);
|
|
||||||
Set(OsuConfig.VideoEditor, true);
|
|
||||||
Set(OsuConfig.EditorDefaultSkin, false);
|
|
||||||
Set(OsuConfig.EditorSnakingSliders, true);
|
|
||||||
Set(OsuConfig.EditorHitAnimations, false);
|
|
||||||
Set(OsuConfig.EditorFollowPoints, true);
|
|
||||||
Set(OsuConfig.EditorStacking, true);
|
|
||||||
Set(OsuConfig.ForceSliderRendering, false);
|
|
||||||
Set(OsuConfig.FpsCounter, false);
|
|
||||||
Set(OsuConfig.FrameTimeDisplay, false);
|
|
||||||
Set(OsuConfig.GuideTips, @"");
|
|
||||||
Set(OsuConfig.CursorRipple, false);
|
|
||||||
Set(OsuConfig.HighlightWords, string.Empty);
|
|
||||||
Set(OsuConfig.HighResolution, false);
|
|
||||||
Set(OsuConfig.HitLighting, true);
|
|
||||||
Set(OsuConfig.IgnoreBarline, false);
|
|
||||||
Set(OsuConfig.IgnoreBeatmapSamples, false);
|
|
||||||
Set(OsuConfig.IgnoreBeatmapSkins, false);
|
|
||||||
Set(OsuConfig.IgnoreList, string.Empty);
|
|
||||||
Set(OsuConfig.KeyOverlay, false);
|
|
||||||
Set(OsuConfig.Language, @"unknown");
|
|
||||||
Set(OsuConfig.AllowNowPlayingHighlights, false);
|
|
||||||
Set(OsuConfig.LastVersion, string.Empty);
|
|
||||||
Set(OsuConfig.LastVersionPermissionsFailed, string.Empty);
|
|
||||||
Set(OsuConfig.LoadSubmittedThread, true);
|
|
||||||
Set(OsuConfig.LobbyPlayMode, -1);
|
|
||||||
Set(OsuConfig.ShowInterface, true);
|
|
||||||
Set(OsuConfig.ShowInterfaceDuringRelax, false);
|
|
||||||
Set(OsuConfig.LobbyShowExistingOnly, false);
|
|
||||||
Set(OsuConfig.LobbyShowFriendsOnly, false);
|
|
||||||
Set(OsuConfig.LobbyShowFull, false);
|
|
||||||
Set(OsuConfig.LobbyShowInProgress, true);
|
|
||||||
Set(OsuConfig.LobbyShowPassworded, true);
|
|
||||||
Set(OsuConfig.LogPrivateMessages, false);
|
|
||||||
Set(OsuConfig.LowResolution, false);
|
|
||||||
//Set(OsuConfig.ManiaSpeed, SpeedMania.SPEED_DEFAULT, SpeedMania.SPEED_MIN, SpeedMania.SPEED_MAX);
|
|
||||||
Set(OsuConfig.UsePerBeatmapManiaSpeed, true);
|
|
||||||
Set(OsuConfig.ManiaSpeedBPMScale, true);
|
|
||||||
Set(OsuConfig.MenuTip, 0);
|
|
||||||
Set(OsuConfig.MouseDisableButtons, false);
|
|
||||||
Set(OsuConfig.MouseDisableWheel, false);
|
|
||||||
Set(OsuConfig.MouseSpeed, 1, 0.4, 6);
|
|
||||||
Set(OsuConfig.Offset, 0, -300, 300);
|
|
||||||
Set(OsuConfig.ScoreMeterScale, 1, 0.5, 2);
|
|
||||||
//Set(OsuConfig.ScoreMeterScale, 1, 0.5, OsuGame.Tournament ? 10 : 2);
|
|
||||||
Set(OsuConfig.DistanceSpacing, 0.8, 0.1, 6);
|
|
||||||
Set(OsuConfig.EditorBeatDivisor, 1, 1, 16);
|
|
||||||
Set(OsuConfig.EditorGridSize, 32, 4, 32);
|
|
||||||
Set(OsuConfig.EditorGridSizeDesign, 32, 4, 32);
|
|
||||||
Set(OsuConfig.CustomFrameLimit, 240, 240, 999);
|
|
||||||
Set(OsuConfig.MsnIntegration, false);
|
|
||||||
Set(OsuConfig.MyPcSucks, false);
|
|
||||||
Set(OsuConfig.NotifyFriends, true);
|
|
||||||
Set(OsuConfig.NotifySubmittedThread, true);
|
|
||||||
Set(OsuConfig.PopupDuringGameplay, true);
|
|
||||||
Set(OsuConfig.ProgressBarType, ProgressBarType.Pie);
|
|
||||||
Set(OsuConfig.RankType, RankingType.Top);
|
|
||||||
Set(OsuConfig.RefreshRate, 60);
|
|
||||||
Set(OsuConfig.OverrideRefreshRate, Get<int>(OsuConfig.RefreshRate) != 60);
|
|
||||||
//Set(OsuConfig.ScaleMode, ScaleMode.WidescreenConservative);
|
|
||||||
Set(OsuConfig.ScoreboardVisible, true);
|
|
||||||
Set(OsuConfig.ScoreMeter, ScoreMeterType.Error);
|
|
||||||
//Set(OsuConfig.ScoreMeter, OsuGame.Tournament ? ScoreMeterType.Colour : ScoreMeterType.Error);
|
|
||||||
Set(OsuConfig.ScreenshotId, 0);
|
|
||||||
Set(OsuConfig.MenuSnow, false);
|
|
||||||
Set(OsuConfig.MenuTriangles, true);
|
|
||||||
Set(OsuConfig.SongSelectThumbnails, true);
|
|
||||||
Set(OsuConfig.ScreenshotFormat, ScreenshotFormat.Jpg);
|
|
||||||
Set(OsuConfig.ShowReplayComments, true);
|
|
||||||
Set(OsuConfig.ShowSpectators, true);
|
|
||||||
Set(OsuConfig.ShowStoryboard, true);
|
|
||||||
//Set(OsuConfig.Skin, SkinManager.DEFAULT_SKIN);
|
|
||||||
Set(OsuConfig.SkinSamples, true);
|
|
||||||
Set(OsuConfig.SkipTablet, false);
|
|
||||||
Set(OsuConfig.SnakingInSliders, true);
|
|
||||||
Set(OsuConfig.SnakingOutSliders, false);
|
|
||||||
Set(OsuConfig.Tablet, false);
|
|
||||||
Set(OsuConfig.UpdatePending, false);
|
|
||||||
Set(OsuConfig.UseSkinCursor, false);
|
|
||||||
Set(OsuConfig.UseTaikoSkin, false);
|
|
||||||
Set(OsuConfig.Video, true);
|
|
||||||
Set(OsuConfig.Wiimote, false);
|
|
||||||
Set(OsuConfig.YahooIntegration, false);
|
|
||||||
Set(OsuConfig.ForceFrameFlush, false);
|
|
||||||
Set(OsuConfig.DetectPerformanceIssues, true);
|
|
||||||
Set(OsuConfig.MenuMusic, true);
|
|
||||||
Set(OsuConfig.MenuVoice, true);
|
|
||||||
Set(OsuConfig.MenuParallax, true);
|
|
||||||
Set(OsuConfig.RawInput, false);
|
|
||||||
Set(OsuConfig.AbsoluteToOsuWindow, Get<bool>(OsuConfig.RawInput));
|
|
||||||
Set(OsuConfig.ShowMenuTips, true);
|
|
||||||
Set(OsuConfig.HiddenShowFirstApproach, true);
|
|
||||||
Set(OsuConfig.ComboColourSliderBall, true);
|
|
||||||
Set(OsuConfig.AlternativeChatFont, false);
|
|
||||||
Set(OsuConfig.DisplayStarsMaximum, 10.0, 0.0, 10.0);
|
|
||||||
Set(OsuConfig.DisplayStarsMinimum, 0.0, 0.0, 10.0);
|
|
||||||
Set(OsuConfig.AudioDevice, string.Empty);
|
Set(OsuConfig.AudioDevice, string.Empty);
|
||||||
Set(OsuConfig.ReleaseStream, ReleaseStream.Lazer);
|
|
||||||
Set(OsuConfig.UpdateFailCount, 0);
|
|
||||||
Set(OsuConfig.SavePassword, false);
|
Set(OsuConfig.SavePassword, false);
|
||||||
Set(OsuConfig.SaveUsername, true);
|
Set(OsuConfig.SaveUsername, true);
|
||||||
//Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All);
|
|
||||||
//Set(OsuConfig.TreeSortMode2, TreeSortMode.Title);
|
Set(OsuConfig.CursorSize, 1.0, 0.5f, 2);
|
||||||
|
Set(OsuConfig.DimLevel, 30, 0, 100);
|
||||||
|
|
||||||
|
Set(OsuConfig.MouseDisableButtons, false);
|
||||||
|
|
||||||
|
Set(OsuConfig.SnakingInSliders, true);
|
||||||
|
Set(OsuConfig.SnakingOutSliders, false);
|
||||||
|
|
||||||
|
//todo: implement all settings below this line (remove the Disabled set when doing so).
|
||||||
|
|
||||||
|
Set(OsuConfig.MouseSpeed, 1.0).Disabled = true;
|
||||||
|
Set(OsuConfig.BeatmapDirectory, @"Songs").Disabled = true; // TODO: use thi.Disabled = trues
|
||||||
|
Set(OsuConfig.AllowPublicInvites, true).Disabled = true;
|
||||||
|
Set(OsuConfig.AutoChatHide, true).Disabled = true;
|
||||||
|
Set(OsuConfig.AutomaticDownload, true).Disabled = true;
|
||||||
|
Set(OsuConfig.AutomaticDownloadNoVideo, false).Disabled = true;
|
||||||
|
Set(OsuConfig.BlockNonFriendPM, false).Disabled = true;
|
||||||
|
Set(OsuConfig.BloomSoftening, false).Disabled = true;
|
||||||
|
Set(OsuConfig.BossKeyFirstActivation, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ChatAudibleHighlight, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ChatChannels, string.Empty).Disabled = true;
|
||||||
|
Set(OsuConfig.ChatFilter, false).Disabled = true;
|
||||||
|
Set(OsuConfig.ChatHighlightName, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ChatMessageNotification, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ChatLastChannel, string.Empty).Disabled = true;
|
||||||
|
Set(OsuConfig.ChatRemoveForeign, false).Disabled = true;
|
||||||
|
//Set(OsuConfig.ChatSortMode, UserSortMode.Rank).Disabled = true;
|
||||||
|
Set(OsuConfig.ComboBurst, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ComboFire, false).Disabled = true;
|
||||||
|
Set(OsuConfig.ComboFireHeight, 3).Disabled = true;
|
||||||
|
Set(OsuConfig.ConfirmExit, false).Disabled = true;
|
||||||
|
Set(OsuConfig.AutoSendNowPlaying, true).Disabled = true;
|
||||||
|
Set(OsuConfig.AutomaticCursorSizing, false).Disabled = true;
|
||||||
|
Set(OsuConfig.Display, 1).Disabled = true;
|
||||||
|
Set(OsuConfig.DisplayCityLocation, false).Disabled = true;
|
||||||
|
Set(OsuConfig.DistanceSpacingEnabled, true).Disabled = true;
|
||||||
|
Set(OsuConfig.EditorTip, 0).Disabled = true;
|
||||||
|
Set(OsuConfig.VideoEditor, true).Disabled = true;
|
||||||
|
Set(OsuConfig.EditorDefaultSkin, false).Disabled = true;
|
||||||
|
Set(OsuConfig.EditorSnakingSliders, true).Disabled = true;
|
||||||
|
Set(OsuConfig.EditorHitAnimations, false).Disabled = true;
|
||||||
|
Set(OsuConfig.EditorFollowPoints, true).Disabled = true;
|
||||||
|
Set(OsuConfig.EditorStacking, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ForceSliderRendering, false).Disabled = true;
|
||||||
|
Set(OsuConfig.FpsCounter, false).Disabled = true;
|
||||||
|
Set(OsuConfig.FrameTimeDisplay, false).Disabled = true;
|
||||||
|
Set(OsuConfig.GuideTips, @"").Disabled = true;
|
||||||
|
Set(OsuConfig.CursorRipple, false).Disabled = true;
|
||||||
|
Set(OsuConfig.HighlightWords, string.Empty).Disabled = true;
|
||||||
|
Set(OsuConfig.HighResolution, false).Disabled = true;
|
||||||
|
Set(OsuConfig.HitLighting, true).Disabled = true;
|
||||||
|
Set(OsuConfig.IgnoreBarline, false).Disabled = true;
|
||||||
|
Set(OsuConfig.IgnoreBeatmapSamples, false).Disabled = true;
|
||||||
|
Set(OsuConfig.IgnoreBeatmapSkins, false).Disabled = true;
|
||||||
|
Set(OsuConfig.IgnoreList, string.Empty).Disabled = true;
|
||||||
|
Set(OsuConfig.KeyOverlay, false).Disabled = true;
|
||||||
|
Set(OsuConfig.Language, @"unknown").Disabled = true;
|
||||||
|
Set(OsuConfig.AllowNowPlayingHighlights, false).Disabled = true;
|
||||||
|
Set(OsuConfig.LastVersion, string.Empty).Disabled = true;
|
||||||
|
Set(OsuConfig.LastVersionPermissionsFailed, string.Empty).Disabled = true;
|
||||||
|
Set(OsuConfig.LoadSubmittedThread, true).Disabled = true;
|
||||||
|
Set(OsuConfig.LobbyPlayMode, -1).Disabled = true;
|
||||||
|
Set(OsuConfig.ShowInterface, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ShowInterfaceDuringRelax, false).Disabled = true;
|
||||||
|
Set(OsuConfig.LobbyShowExistingOnly, false).Disabled = true;
|
||||||
|
Set(OsuConfig.LobbyShowFriendsOnly, false).Disabled = true;
|
||||||
|
Set(OsuConfig.LobbyShowFull, false).Disabled = true;
|
||||||
|
Set(OsuConfig.LobbyShowInProgress, true).Disabled = true;
|
||||||
|
Set(OsuConfig.LobbyShowPassworded, true).Disabled = true;
|
||||||
|
Set(OsuConfig.LogPrivateMessages, false).Disabled = true;
|
||||||
|
Set(OsuConfig.LowResolution, false).Disabled = true;
|
||||||
|
//Set(OsuConfig.ManiaSpeed, SpeedMania.SPEED_DEFAULT, SpeedMania.SPEED_MIN, SpeedMania.SPEED_MAX).Disabled = true;
|
||||||
|
Set(OsuConfig.UsePerBeatmapManiaSpeed, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ManiaSpeedBPMScale, true).Disabled = true;
|
||||||
|
Set(OsuConfig.MenuTip, 0).Disabled = true;
|
||||||
|
Set(OsuConfig.MouseDisableWheel, false).Disabled = true;
|
||||||
|
Set(OsuConfig.MouseSpeed, 1, 0.4, 6).Disabled = true;
|
||||||
|
Set(OsuConfig.Offset, 0, -300, 300).Disabled = true;
|
||||||
|
Set(OsuConfig.ScoreMeterScale, 1, 0.5, 2).Disabled = true;
|
||||||
|
//Set(OsuConfig.ScoreMeterScale, 1, 0.5, OsuGame.Tournament ? 10 : 2).Disabled = true;
|
||||||
|
Set(OsuConfig.DistanceSpacing, 0.8, 0.1, 6).Disabled = true;
|
||||||
|
Set(OsuConfig.EditorBeatDivisor, 1, 1, 16).Disabled = true;
|
||||||
|
Set(OsuConfig.EditorGridSize, 32, 4, 32).Disabled = true;
|
||||||
|
Set(OsuConfig.EditorGridSizeDesign, 32, 4, 32).Disabled = true;
|
||||||
|
Set(OsuConfig.CustomFrameLimit, 240, 240, 999).Disabled = true;
|
||||||
|
Set(OsuConfig.MsnIntegration, false).Disabled = true;
|
||||||
|
Set(OsuConfig.MyPcSucks, false).Disabled = true;
|
||||||
|
Set(OsuConfig.NotifyFriends, true).Disabled = true;
|
||||||
|
Set(OsuConfig.NotifySubmittedThread, true).Disabled = true;
|
||||||
|
Set(OsuConfig.PopupDuringGameplay, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ProgressBarType, ProgressBarType.Pie).Disabled = true;
|
||||||
|
Set(OsuConfig.RankType, RankingType.Top).Disabled = true;
|
||||||
|
Set(OsuConfig.RefreshRate, 60).Disabled = true;
|
||||||
|
Set(OsuConfig.OverrideRefreshRate, Get<int>(OsuConfig.RefreshRate) != 60).Disabled = true;
|
||||||
|
//Set(OsuConfig.ScaleMode, ScaleMode.WidescreenConservative).Disabled = true;
|
||||||
|
Set(OsuConfig.ScoreboardVisible, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ScoreMeter, ScoreMeterType.Error).Disabled = true;
|
||||||
|
//Set(OsuConfig.ScoreMeter, OsuGame.Tournament ? ScoreMeterType.Colour : ScoreMeterType.Error).Disabled = true;
|
||||||
|
Set(OsuConfig.ScreenshotId, 0).Disabled = true;
|
||||||
|
Set(OsuConfig.MenuSnow, false).Disabled = true;
|
||||||
|
Set(OsuConfig.MenuTriangles, true).Disabled = true;
|
||||||
|
Set(OsuConfig.SongSelectThumbnails, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ScreenshotFormat, ScreenshotFormat.Jpg).Disabled = true;
|
||||||
|
Set(OsuConfig.ShowReplayComments, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ShowSpectators, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ShowStoryboard, true).Disabled = true;
|
||||||
|
//Set(OsuConfig.Skin, SkinManager.DEFAULT_SKIN).Disabled = true;
|
||||||
|
Set(OsuConfig.SkinSamples, true).Disabled = true;
|
||||||
|
Set(OsuConfig.SkipTablet, false).Disabled = true;
|
||||||
|
Set(OsuConfig.Tablet, false).Disabled = true;
|
||||||
|
Set(OsuConfig.UpdatePending, false).Disabled = true;
|
||||||
|
Set(OsuConfig.UseSkinCursor, false).Disabled = true;
|
||||||
|
Set(OsuConfig.UseTaikoSkin, false).Disabled = true;
|
||||||
|
Set(OsuConfig.Video, true).Disabled = true;
|
||||||
|
Set(OsuConfig.Wiimote, false).Disabled = true;
|
||||||
|
Set(OsuConfig.YahooIntegration, false).Disabled = true;
|
||||||
|
Set(OsuConfig.ForceFrameFlush, false).Disabled = true;
|
||||||
|
Set(OsuConfig.DetectPerformanceIssues, true).Disabled = true;
|
||||||
|
Set(OsuConfig.MenuMusic, true).Disabled = true;
|
||||||
|
Set(OsuConfig.MenuVoice, true).Disabled = true;
|
||||||
|
Set(OsuConfig.MenuParallax, true).Disabled = true;
|
||||||
|
Set(OsuConfig.RawInput, false).Disabled = true;
|
||||||
|
Set(OsuConfig.AbsoluteToOsuWindow, Get<bool>(OsuConfig.RawInput)).Disabled = true;
|
||||||
|
Set(OsuConfig.ShowMenuTips, true).Disabled = true;
|
||||||
|
Set(OsuConfig.HiddenShowFirstApproach, true).Disabled = true;
|
||||||
|
Set(OsuConfig.ComboColourSliderBall, true).Disabled = true;
|
||||||
|
Set(OsuConfig.AlternativeChatFont, false).Disabled = true;
|
||||||
|
Set(OsuConfig.DisplayStarsMaximum, 10.0, 0.0, 10.0).Disabled = true;
|
||||||
|
Set(OsuConfig.DisplayStarsMinimum, 0.0, 0.0, 10.0).Disabled = true;
|
||||||
|
Set(OsuConfig.ReleaseStream, ReleaseStream.Lazer).Disabled = true;
|
||||||
|
Set(OsuConfig.UpdateFailCount, 0).Disabled = true;
|
||||||
|
//Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All).Disabled = true;
|
||||||
|
//Set(OsuConfig.TreeSortMode2, TreeSortMode.Title).Disabled = true;
|
||||||
bool unicodeDefault = false;
|
bool unicodeDefault = false;
|
||||||
switch (Get<string>(OsuConfig.Language))
|
switch (Get<string>(OsuConfig.Language))
|
||||||
{
|
{
|
||||||
@ -162,12 +166,12 @@ namespace osu.Game.Configuration
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Set(OsuConfig.ShowUnicode, unicodeDefault);
|
Set(OsuConfig.ShowUnicode, unicodeDefault);
|
||||||
Set(OsuConfig.PermanentSongInfo, false);
|
Set(OsuConfig.PermanentSongInfo, false).Disabled = true;
|
||||||
Set(OsuConfig.Ticker, false);
|
Set(OsuConfig.Ticker, false).Disabled = true;
|
||||||
Set(OsuConfig.CompatibilityContext, false);
|
Set(OsuConfig.CompatibilityContext, false).Disabled = true;
|
||||||
Set(OsuConfig.CanForceOptimusCompatibility, true);
|
Set(OsuConfig.CanForceOptimusCompatibility, true).Disabled = true;
|
||||||
Set(OsuConfig.ConfineMouse, Get<bool>(OsuConfig.ConfineMouseToFullscreen) ?
|
Set(OsuConfig.ConfineMouse, Get<bool>(OsuConfig.ConfineMouseToFullscreen) ?
|
||||||
ConfineMouseMode.Fullscreen : ConfineMouseMode.Never);
|
ConfineMouseMode.Fullscreen : ConfineMouseMode.Never).Disabled = true;
|
||||||
|
|
||||||
|
|
||||||
GetBindable<bool>(OsuConfig.SavePassword).ValueChanged += delegate
|
GetBindable<bool>(OsuConfig.SavePassword).ValueChanged += delegate
|
||||||
|
@ -20,6 +20,8 @@ namespace osu.Game.Graphics.Backgrounds
|
|||||||
|
|
||||||
public Background(string textureName = @"")
|
public Background(string textureName = @"")
|
||||||
{
|
{
|
||||||
|
CacheDrawnFrameBuffer = true;
|
||||||
|
|
||||||
this.textureName = textureName;
|
this.textureName = textureName;
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
Depth = float.MaxValue;
|
Depth = float.MaxValue;
|
||||||
|
@ -32,10 +32,15 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Font = @"Exo2.0-Bold",
|
Font = @"Exo2.0-Bold",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public override bool HandleInput => Action != null;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
Colour = colours.BlueDark;
|
if (Action == null)
|
||||||
|
Colour = OsuColour.Gray(0.5f);
|
||||||
|
|
||||||
|
BackgroundColour = colours.BlueDark;
|
||||||
|
|
||||||
Content.Masking = true;
|
Content.Masking = true;
|
||||||
Content.CornerRadius = 5;
|
Content.CornerRadius = 5;
|
||||||
|
@ -39,6 +39,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
State = bindable.Value ? CheckBoxState.Checked : CheckBoxState.Unchecked;
|
State = bindable.Value ? CheckBoxState.Checked : CheckBoxState.Unchecked;
|
||||||
bindable.ValueChanged += bindableValueChanged;
|
bindable.ValueChanged += bindableValueChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bindable?.Disabled ?? true)
|
||||||
|
Alpha = 0.3f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,20 +126,20 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
protected override void OnChecked()
|
protected override void OnChecked()
|
||||||
{
|
{
|
||||||
if (bindable != null)
|
|
||||||
bindable.Value = true;
|
|
||||||
|
|
||||||
sampleChecked?.Play();
|
sampleChecked?.Play();
|
||||||
nub.State = CheckBoxState.Checked;
|
nub.State = CheckBoxState.Checked;
|
||||||
|
|
||||||
|
if (bindable != null)
|
||||||
|
bindable.Value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnUnchecked()
|
protected override void OnUnchecked()
|
||||||
{
|
{
|
||||||
if (bindable != null)
|
|
||||||
bindable.Value = false;
|
|
||||||
|
|
||||||
sampleUnchecked?.Play();
|
sampleUnchecked?.Play();
|
||||||
nub.State = CheckBoxState.Unchecked;
|
nub.State = CheckBoxState.Unchecked;
|
||||||
|
|
||||||
|
if (bindable != null)
|
||||||
|
bindable.Value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
@ -19,6 +19,10 @@ namespace osu.Game.Modes.Objects.Drawables
|
|||||||
{
|
{
|
||||||
public event Action<DrawableHitObject, JudgementInfo> OnJudgement;
|
public event Action<DrawableHitObject, JudgementInfo> OnJudgement;
|
||||||
|
|
||||||
|
public override bool HandleInput => Interactive;
|
||||||
|
|
||||||
|
public bool Interactive = true;
|
||||||
|
|
||||||
public Container<DrawableHitObject> ChildObjects;
|
public Container<DrawableHitObject> ChildObjects;
|
||||||
|
|
||||||
public JudgementInfo Judgement;
|
public JudgementInfo Judgement;
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Objects.Drawables
|
||||||
|
{
|
||||||
|
public interface IDrawableHitObjectWithProxiedApproach
|
||||||
|
{
|
||||||
|
Drawable ProxiedLayer { get; }
|
||||||
|
}
|
||||||
|
}
|
14
osu.Game/Modes/Objects/NullHitObjectParser.cs
Normal file
14
osu.Game/Modes/Objects/NullHitObjectParser.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Objects
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Returns null HitObjects but at least allows us to run.
|
||||||
|
/// </summary>
|
||||||
|
public class NullHitObjectParser : HitObjectParser
|
||||||
|
{
|
||||||
|
public override HitObject Parse(string text) => null;
|
||||||
|
}
|
||||||
|
}
|
@ -25,6 +25,7 @@ using OpenTK;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Game.Overlays.Notifications;
|
||||||
|
|
||||||
namespace osu.Game
|
namespace osu.Game
|
||||||
{
|
{
|
||||||
@ -130,6 +131,16 @@ namespace osu.Game
|
|||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
}).Preload(this, overlayContent.Add);
|
}).Preload(this, overlayContent.Add);
|
||||||
|
|
||||||
|
Logger.NewEntry += entry =>
|
||||||
|
{
|
||||||
|
if (entry.Level < LogLevel.Important) return;
|
||||||
|
|
||||||
|
notificationManager.Post(new SimpleNotification
|
||||||
|
{
|
||||||
|
Text = $@"{entry.Level}: {entry.Message}"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
Dependencies.Cache(options);
|
Dependencies.Cache(options);
|
||||||
Dependencies.Cache(musicController);
|
Dependencies.Cache(musicController);
|
||||||
Dependencies.Cache(notificationManager);
|
Dependencies.Cache(notificationManager);
|
||||||
|
@ -34,29 +34,32 @@ namespace osu.Game.Overlays.Options
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (bindable != null)
|
if (bindable != null)
|
||||||
bindable.ValueChanged -= Bindable_ValueChanged;
|
bindable.ValueChanged -= bindable_ValueChanged;
|
||||||
bindable = value;
|
bindable = value;
|
||||||
bindable.ValueChanged += Bindable_ValueChanged;
|
bindable.ValueChanged += bindable_ValueChanged;
|
||||||
Bindable_ValueChanged(null, null);
|
bindable_ValueChanged(null, null);
|
||||||
|
|
||||||
|
if (bindable?.Disabled ?? true)
|
||||||
|
Alpha = 0.3f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Bindable<T> bindable;
|
private Bindable<T> bindable;
|
||||||
|
|
||||||
void Bindable_ValueChanged(object sender, EventArgs e)
|
void bindable_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
dropdown.SelectedValue = bindable.Value;
|
dropdown.SelectedValue = bindable.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dropdown_ValueChanged(object sender, EventArgs e)
|
void dropdown_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
bindable.Value = dropdown.SelectedValue;
|
bindable.Value = dropdown.SelectedValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
bindable.ValueChanged -= Bindable_ValueChanged;
|
bindable.ValueChanged -= bindable_ValueChanged;
|
||||||
dropdown.ValueChanged -= Dropdown_ValueChanged;
|
dropdown.ValueChanged -= dropdown_ValueChanged;
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +104,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
Items = this.Items,
|
Items = this.Items,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
dropdown.ValueChanged += Dropdown_ValueChanged;
|
dropdown.ValueChanged += dropdown_ValueChanged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
using System;
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 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 OpenTK.Graphics;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -30,7 +31,12 @@ namespace osu.Game.Overlays.Options
|
|||||||
public BindableNumber<T> Bindable
|
public BindableNumber<T> Bindable
|
||||||
{
|
{
|
||||||
get { return slider.Bindable; }
|
get { return slider.Bindable; }
|
||||||
set { slider.Bindable = value; }
|
set
|
||||||
|
{
|
||||||
|
slider.Bindable = value;
|
||||||
|
if (value?.Disabled ?? true)
|
||||||
|
Alpha = 0.3f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionSlider()
|
public OptionSlider()
|
||||||
|
@ -24,6 +24,9 @@ namespace osu.Game.Overlays.Options
|
|||||||
base.Text = bindable.Value;
|
base.Text = bindable.Value;
|
||||||
bindable.ValueChanged += bindableValueChanged;
|
bindable.ValueChanged += bindableValueChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bindable?.Disabled ?? true)
|
||||||
|
Alpha = 0.3f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,12 +41,11 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
Direction = FlowDirections.Horizontal,
|
Direction = FlowDirections.Horizontal,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Padding = new MarginPadding { Left = 10, Right = 10 },
|
Padding = new MarginPadding { Left = padding, Right = padding },
|
||||||
},
|
},
|
||||||
modeButtonLine = new Container
|
modeButtonLine = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
Size = new Vector2(padding * 2 + ToolbarButton.WIDTH, 3),
|
||||||
Size = new Vector2(0.3f, 3),
|
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.TopLeft,
|
Origin = Anchor.TopLeft,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
|
@ -78,7 +78,6 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
public BeatmapBackground(WorkingBeatmap beatmap)
|
public BeatmapBackground(WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
CacheDrawnFrameBuffer = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -145,7 +145,7 @@ namespace osu.Game.Screens
|
|||||||
Size = new Vector2(1, 40),
|
Size = new Vector2(1, 40),
|
||||||
Anchor = Anchor.BottomRight,
|
Anchor = Anchor.BottomRight,
|
||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
Colour = getColourFor(t),
|
BackgroundColour = getColourFor(t),
|
||||||
Action = delegate
|
Action = delegate
|
||||||
{
|
{
|
||||||
Push(Activator.CreateInstance(t) as GameMode);
|
Push(Activator.CreateInstance(t) as GameMode);
|
||||||
|
@ -23,6 +23,7 @@ using System.Linq;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Logging;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
{
|
{
|
||||||
@ -75,9 +76,14 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
if (Beatmap == null)
|
if (Beatmap == null)
|
||||||
Beatmap = beatmaps.GetWorkingBeatmap(BeatmapInfo, withStoryboard: true);
|
Beatmap = beatmaps.GetWorkingBeatmap(BeatmapInfo, withStoryboard: true);
|
||||||
|
|
||||||
|
if ((Beatmap?.Beatmap?.HitObjects.Count ?? 0) == 0)
|
||||||
|
throw new Exception("No valid objects were found!");
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Could not load this beatmap sucessfully ({e})!", LoggingTarget.Runtime, LogLevel.Error);
|
||||||
|
|
||||||
//couldn't load, hard abort!
|
//couldn't load, hard abort!
|
||||||
Exit();
|
Exit();
|
||||||
return;
|
return;
|
||||||
@ -117,7 +123,8 @@ namespace osu.Game.Screens.Play
|
|||||||
pauseOverlay = new PauseOverlay
|
pauseOverlay = new PauseOverlay
|
||||||
{
|
{
|
||||||
Depth = -1,
|
Depth = -1,
|
||||||
OnResume = delegate {
|
OnResume = delegate
|
||||||
|
{
|
||||||
Delay(400);
|
Delay(400);
|
||||||
Schedule(Resume);
|
Schedule(Resume);
|
||||||
},
|
},
|
||||||
@ -279,7 +286,7 @@ namespace osu.Game.Screens.Play
|
|||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
|
|
||||||
(Background as BackgroundModeBeatmap)?.BlurTo(Vector2.Zero, 1000);
|
(Background as BackgroundModeBeatmap)?.BlurTo(Vector2.Zero, 1000);
|
||||||
Background?.FadeTo((100f- dimLevel)/100, 1000);
|
Background?.FadeTo((100f - dimLevel) / 100, 1000);
|
||||||
|
|
||||||
Content.Alpha = 0;
|
Content.Alpha = 0;
|
||||||
dimLevel.ValueChanged += dimChanged;
|
dimLevel.ValueChanged += dimChanged;
|
||||||
@ -287,6 +294,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected override bool OnExiting(GameMode next)
|
protected override bool OnExiting(GameMode next)
|
||||||
{
|
{
|
||||||
|
if (pauseOverlay == null) return false;
|
||||||
|
|
||||||
if (pauseOverlay.State != Visibility.Visible && !canPause) return true;
|
if (pauseOverlay.State != Visibility.Visible && !canPause) return true;
|
||||||
|
|
||||||
if (!IsPaused && sourceClock.IsRunning) // For if the user presses escape quickly when entering the map
|
if (!IsPaused && sourceClock.IsRunning) // For if the user presses escape quickly when entering the map
|
||||||
|
@ -74,7 +74,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
Name = "Length",
|
Name = "Length",
|
||||||
Icon = FontAwesome.fa_clock_o,
|
Icon = FontAwesome.fa_clock_o,
|
||||||
Content = TimeSpan.FromMilliseconds(beatmap.Beatmap.HitObjects.Last().EndTime - beatmap.Beatmap.HitObjects.First().StartTime).ToString(@"m\:ss"),
|
Content = beatmap.Beatmap.HitObjects.Count == 0 ? "-" : TimeSpan.FromMilliseconds(beatmap.Beatmap.HitObjects.Last().EndTime - beatmap.Beatmap.HitObjects.First().StartTime).ToString(@"m\:ss"),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
labels.Add(new InfoLabel(new BeatmapStatistic
|
labels.Add(new InfoLabel(new BeatmapStatistic
|
||||||
|
@ -75,7 +75,9 @@
|
|||||||
<Compile Include="Graphics\UserInterface\OsuSliderBar.cs" />
|
<Compile Include="Graphics\UserInterface\OsuSliderBar.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\OsuTextBox.cs" />
|
<Compile Include="Graphics\UserInterface\OsuTextBox.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\TwoLayerButton.cs" />
|
<Compile Include="Graphics\UserInterface\TwoLayerButton.cs" />
|
||||||
|
<Compile Include="Modes\Objects\Drawables\IDrawableHitObjectWithProxiedApproach.cs" />
|
||||||
<Compile Include="Modes\Objects\HitObjectParser.cs" />
|
<Compile Include="Modes\Objects\HitObjectParser.cs" />
|
||||||
|
<Compile Include="Modes\Objects\NullHitObjectParser.cs" />
|
||||||
<Compile Include="Modes\Score.cs" />
|
<Compile Include="Modes\Score.cs" />
|
||||||
<Compile Include="Modes\ScoreProcesssor.cs" />
|
<Compile Include="Modes\ScoreProcesssor.cs" />
|
||||||
<Compile Include="Modes\UI\HealthDisplay.cs" />
|
<Compile Include="Modes\UI\HealthDisplay.cs" />
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<packages>
|
<packages>
|
||||||
<package id="DotNetZip" version="1.10.1" targetFramework="net45" />
|
<package id="DotNetZip" version="1.10.1" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
|
|
||||||
extensions: .xml .config .xsd
|
extensions: .xml .config .xsd
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 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
|
||||||
-->
|
-->
|
7
osu.sln
7
osu.sln
@ -31,6 +31,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Modes.Mania", "osu
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Desktop.Tests", "osu.Desktop.Tests\osu.Desktop.Tests.csproj", "{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Desktop.Tests", "osu.Desktop.Tests\osu.Desktop.Tests.csproj", "{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Desktop.Deploy", "osu.Desktop.Deploy\osu.Desktop.Deploy.csproj", "{BAEA2F74-0315-4667-84E0-ACAC0B4BF785}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{6EAD7610-89D8-48A2-8BE0-E348297E4D8B}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -85,6 +89,8 @@ Global
|
|||||||
{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Release|Any CPU.Build.0 = Release|Any CPU
|
{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{BAEA2F74-0315-4667-84E0-ACAC0B4BF785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BAEA2F74-0315-4667-84E0-ACAC0B4BF785}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -102,6 +108,7 @@ Global
|
|||||||
{F167E17A-7DE6-4AF5-B920-A5112296C695} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3}
|
{F167E17A-7DE6-4AF5-B920-A5112296C695} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3}
|
||||||
{48F4582B-7687-4621-9CBE-5C24197CB536} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3}
|
{48F4582B-7687-4621-9CBE-5C24197CB536} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3}
|
||||||
{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3}
|
{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3}
|
||||||
|
{BAEA2F74-0315-4667-84E0-ACAC0B4BF785} = {6EAD7610-89D8-48A2-8BE0-E348297E4D8B}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(MonoDevelopProperties) = preSolution
|
GlobalSection(MonoDevelopProperties) = preSolution
|
||||||
Policies = $0
|
Policies = $0
|
||||||
|
@ -21,8 +21,10 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FSimpleTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FSimpleTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SwitchStatementMissingSomeCases/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SwitchStatementMissingSomeCases/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMember_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMember_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMember_002ELocal/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMethodReturnValue_002ELocal/@EntryIndexedValue">SUGGESTION</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMethodReturnValue_002ELocal/@EntryIndexedValue">SUGGESTION</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedParameter_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedParameter_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VirtualMemberCallInConstructor/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Code_0020Cleanup_0020_0028peppy_0029/@EntryIndexedValue"><?xml version="1.0" encoding="utf-16"?><Profile name="Code Cleanup (peppy)"><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSUseVar><BehavourStyle>CAN_CHANGE_TO_EXPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_EXPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_EXPLICIT</ForeachVariableStyle></CSUseVar><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSUpdateFileHeader>True</CSUpdateFileHeader><CSCodeStyleAttributes ArrangeTypeAccessModifier="False" ArrangeTypeMemberAccessModifier="False" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="False" ArrangeBraces="False" ArrangeAttributes="False" ArrangeArgumentsStyle="False" /><XAMLCollapseEmptyTags>False</XAMLCollapseEmptyTags><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CSArrangeQualifiers>True</CSArrangeQualifiers></Profile></s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Code_0020Cleanup_0020_0028peppy_0029/@EntryIndexedValue"><?xml version="1.0" encoding="utf-16"?><Profile name="Code Cleanup (peppy)"><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSUseVar><BehavourStyle>CAN_CHANGE_TO_EXPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_EXPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_EXPLICIT</ForeachVariableStyle></CSUseVar><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSUpdateFileHeader>True</CSUpdateFileHeader><CSCodeStyleAttributes ArrangeTypeAccessModifier="False" ArrangeTypeMemberAccessModifier="False" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="False" ArrangeBraces="False" ArrangeAttributes="False" ArrangeArgumentsStyle="False" /><XAMLCollapseEmptyTags>False</XAMLCollapseEmptyTags><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CSArrangeQualifiers>True</CSArrangeQualifiers></Profile></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue">Code Cleanup (peppy)</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue">Code Cleanup (peppy)</s:String>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_LINQ_QUERY/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_LINQ_QUERY/@EntryValue">True</s:Boolean>
|
||||||
|
Loading…
Reference in New Issue
Block a user