mirror of
https://github.com/ppy/osu-tools.git
synced 2025-06-10 01:50:46 +09:00
Fix some remaining CI issues
This commit is contained in:
parent
39857a4f2c
commit
b257a15409
5 changed files with 36 additions and 18 deletions
|
@ -1,6 +1,7 @@
|
||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -33,7 +34,10 @@ namespace PerformanceCalculatorGUI
|
||||||
public async Task<T> GetJsonFromApi<T>(string request)
|
public async Task<T> GetJsonFromApi<T>(string request)
|
||||||
{
|
{
|
||||||
if (token == null)
|
if (token == null)
|
||||||
|
{
|
||||||
await getAccessToken();
|
await getAccessToken();
|
||||||
|
Debug.Assert(token != null);
|
||||||
|
}
|
||||||
|
|
||||||
using var req = new JsonWebRequest<T>($"{ENDPOINT_CONFIGURATION.APIEndpointUrl}/api/v2/{request}");
|
using var req = new JsonWebRequest<T>($"{ENDPOINT_CONFIGURATION.APIEndpointUrl}/api/v2/{request}");
|
||||||
req.AddHeader("x-api-version", api_version.ToString(CultureInfo.InvariantCulture));
|
req.AddHeader("x-api-version", api_version.ToString(CultureInfo.InvariantCulture));
|
||||||
|
|
|
@ -2,24 +2,12 @@
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Localisation;
|
|
||||||
using osu.Game.Beatmaps.Drawables.Cards;
|
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Overlays.Toolbar;
|
using osu.Game.Overlays.Toolbar;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace PerformanceCalculatorGUI.Components
|
namespace PerformanceCalculatorGUI.Components
|
||||||
{
|
{
|
||||||
public class ScreenSelectionButtonIcon : IconPill
|
|
||||||
{
|
|
||||||
public ScreenSelectionButtonIcon(IconUsage? icon = null)
|
|
||||||
: base(icon ?? FontAwesome.Solid.List)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override LocalisableString TooltipText => string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal class ScreenSelectionButton : ToolbarButton
|
internal class ScreenSelectionButton : ToolbarButton
|
||||||
{
|
{
|
||||||
public ScreenSelectionButton(string title, IconUsage? icon = null, GlobalAction? hotkey = null)
|
public ScreenSelectionButton(string title, IconUsage? icon = null, GlobalAction? hotkey = null)
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Beatmaps.Drawables.Cards;
|
||||||
|
|
||||||
|
namespace PerformanceCalculatorGUI.Components;
|
||||||
|
|
||||||
|
public class ScreenSelectionButtonIcon : IconPill
|
||||||
|
{
|
||||||
|
public ScreenSelectionButtonIcon(IconUsage? icon = null)
|
||||||
|
: base(icon ?? FontAwesome.Solid.List)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override LocalisableString TooltipText => string.Empty;
|
||||||
|
}
|
|
@ -15,12 +15,6 @@ using osu.Game.Rulesets.Taiko.Difficulty;
|
||||||
|
|
||||||
namespace PerformanceCalculatorGUI
|
namespace PerformanceCalculatorGUI
|
||||||
{
|
{
|
||||||
public interface IExtendedDifficultyCalculator
|
|
||||||
{
|
|
||||||
Skill[] GetSkills();
|
|
||||||
DifficultyHitObject[] GetDifficultyHitObjects(IBeatmap beatmap, double clockRate);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ExtendedOsuDifficultyCalculator : OsuDifficultyCalculator, IExtendedDifficultyCalculator
|
public class ExtendedOsuDifficultyCalculator : OsuDifficultyCalculator, IExtendedDifficultyCalculator
|
||||||
{
|
{
|
||||||
private Skill[] skills;
|
private Skill[] skills;
|
||||||
|
|
14
PerformanceCalculatorGUI/IExtendedDifficultyCalculator.cs
Normal file
14
PerformanceCalculatorGUI/IExtendedDifficultyCalculator.cs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Rulesets.Difficulty.Preprocessing;
|
||||||
|
using osu.Game.Rulesets.Difficulty.Skills;
|
||||||
|
|
||||||
|
namespace PerformanceCalculatorGUI;
|
||||||
|
|
||||||
|
public interface IExtendedDifficultyCalculator
|
||||||
|
{
|
||||||
|
Skill[] GetSkills();
|
||||||
|
DifficultyHitObject[] GetDifficultyHitObjects(IBeatmap beatmap, double clockRate);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue