1
0
Fork 0
mirror of https://github.com/ppy/osu-tools.git synced 2025-06-09 09:35:15 +09:00

Fix some remaining CI issues

This commit is contained in:
Dean Herbert 2022-07-24 23:32:42 +09:00
parent 39857a4f2c
commit b257a15409
5 changed files with 36 additions and 18 deletions

View file

@ -1,6 +1,7 @@
// 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 System.Diagnostics;
using System.Globalization;
using System.Net.Http;
using System.Threading.Tasks;
@ -33,7 +34,10 @@ namespace PerformanceCalculatorGUI
public async Task<T> GetJsonFromApi<T>(string request)
{
if (token == null)
{
await getAccessToken();
Debug.Assert(token != null);
}
using var req = new JsonWebRequest<T>($"{ENDPOINT_CONFIGURATION.APIEndpointUrl}/api/v2/{request}");
req.AddHeader("x-api-version", api_version.ToString(CultureInfo.InvariantCulture));

View file

@ -2,24 +2,12 @@
// 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;
using osu.Game.Input.Bindings;
using osu.Game.Overlays.Toolbar;
using osuTK;
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
{
public ScreenSelectionButton(string title, IconUsage? icon = null, GlobalAction? hotkey = null)

View file

@ -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;
}

View file

@ -15,12 +15,6 @@ using osu.Game.Rulesets.Taiko.Difficulty;
namespace PerformanceCalculatorGUI
{
public interface IExtendedDifficultyCalculator
{
Skill[] GetSkills();
DifficultyHitObject[] GetDifficultyHitObjects(IBeatmap beatmap, double clockRate);
}
public class ExtendedOsuDifficultyCalculator : OsuDifficultyCalculator, IExtendedDifficultyCalculator
{
private Skill[] skills;

View 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);
}