mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 08:52:54 +08:00
CI fixes
This commit is contained in:
parent
33adf569a4
commit
efa39f38ca
@ -2,12 +2,13 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Game.Rulesets.Edit;
|
||||||
using osu.Game.Rulesets.Edit.Tools;
|
using osu.Game.Rulesets.Edit.Tools;
|
||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Edit
|
namespace osu.Game.Rulesets.Osu.Edit
|
||||||
{
|
{
|
||||||
public class OsuHitObjectComposer : Rulesets.Edit.HitObjectComposer
|
public class OsuHitObjectComposer : HitObjectComposer
|
||||||
{
|
{
|
||||||
public OsuHitObjectComposer(Ruleset ruleset)
|
public OsuHitObjectComposer(Ruleset ruleset)
|
||||||
: base(ruleset)
|
: base(ruleset)
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
|
||||||
using osu.Game.Screens.Edit.Screens.Compose.RadioButtons;
|
using osu.Game.Screens.Edit.Screens.Compose.RadioButtons;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
|
@ -6,17 +6,14 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Rulesets.Edit.Tools;
|
using osu.Game.Rulesets.Edit.Tools;
|
||||||
using osu.Game.Rulesets.Objects;
|
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osu.Game.Screens.Edit.Screens.Compose.RadioButtons;
|
using osu.Game.Screens.Edit.Screens.Compose.RadioButtons;
|
||||||
using osu.Game.Screens.Play.ReplaySettings;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Edit
|
namespace osu.Game.Rulesets.Edit
|
||||||
{
|
{
|
||||||
@ -24,7 +21,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
{
|
{
|
||||||
private readonly Ruleset ruleset;
|
private readonly Ruleset ruleset;
|
||||||
|
|
||||||
public HitObjectComposer(Ruleset ruleset)
|
protected HitObjectComposer(Ruleset ruleset)
|
||||||
{
|
{
|
||||||
this.ruleset = ruleset;
|
this.ruleset = ruleset;
|
||||||
|
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
// 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;
|
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Timing;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Screens.Edit.Screens.Compose.Timeline;
|
using osu.Game.Screens.Edit.Screens.Compose.Timeline;
|
||||||
|
|
||||||
@ -85,7 +83,14 @@ namespace osu.Game.Screens.Edit.Screens.Compose
|
|||||||
composerContainer.Clear();
|
composerContainer.Clear();
|
||||||
|
|
||||||
var ruleset = newBeatmap.BeatmapInfo.Ruleset?.CreateInstance();
|
var ruleset = newBeatmap.BeatmapInfo.Ruleset?.CreateInstance();
|
||||||
var composer = ruleset?.CreateHitObjectComposer();
|
if (ruleset == null)
|
||||||
|
{
|
||||||
|
Logger.Log("Beatmap doesn't have a ruleset assigned.");
|
||||||
|
// ExitRequested?.Invoke();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var composer = ruleset.CreateHitObjectComposer();
|
||||||
if (composer == null)
|
if (composer == null)
|
||||||
{
|
{
|
||||||
Logger.Log($"Ruleset {ruleset.Description} doesn't support hitobject composition.");
|
Logger.Log($"Ruleset {ruleset.Description} doesn't support hitobject composition.");
|
||||||
|
@ -19,10 +19,10 @@ namespace osu.Game.Screens.Edit.Screens.Compose.RadioButtons
|
|||||||
{
|
{
|
||||||
public class DrawableRadioButton : TriangleButton
|
public class DrawableRadioButton : TriangleButton
|
||||||
{
|
{
|
||||||
private static readonly Color4 DefaultBackgroundColour = OsuColour.FromHex("333");
|
private static readonly Color4 default_background_colour = OsuColour.FromHex("333");
|
||||||
private static readonly Color4 DefaultBubbleColour = DefaultBackgroundColour.Darken(0.5f);
|
private static readonly Color4 default_bubble_colour = default_background_colour.Darken(0.5f);
|
||||||
private static readonly Color4 SelectedBackgroundColour = OsuColour.FromHex("1188aa");
|
private static readonly Color4 selected_background_colour = OsuColour.FromHex("1188aa");
|
||||||
private static readonly Color4 SelectedBubbleColour = SelectedBackgroundColour.Lighten(0.5f);
|
private static readonly Color4 selected_bubble_colour = selected_background_colour.Lighten(0.5f);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invoked when this <see cref="DrawableRadioButton"/> has been selected.
|
/// Invoked when this <see cref="DrawableRadioButton"/> has been selected.
|
||||||
@ -43,7 +43,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.RadioButtons
|
|||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Triangles.Alpha = 0;
|
Triangles.Alpha = 0;
|
||||||
BackgroundColour = DefaultBackgroundColour;
|
BackgroundColour = default_background_colour;
|
||||||
|
|
||||||
Content.EdgeEffect = new EdgeEffectParameters
|
Content.EdgeEffect = new EdgeEffectParameters
|
||||||
{
|
{
|
||||||
@ -62,7 +62,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.RadioButtons
|
|||||||
Scale = new Vector2(0.5f),
|
Scale = new Vector2(0.5f),
|
||||||
X = 10,
|
X = 10,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
Colour = DefaultBubbleColour,
|
Colour = default_bubble_colour,
|
||||||
Blending = BlendingMode.Additive,
|
Blending = BlendingMode.Additive,
|
||||||
Child = new Box { RelativeSizeAxes = Axes.Both }
|
Child = new Box { RelativeSizeAxes = Axes.Both }
|
||||||
});
|
});
|
||||||
@ -76,8 +76,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose.RadioButtons
|
|||||||
return;
|
return;
|
||||||
isSelected = false;
|
isSelected = false;
|
||||||
|
|
||||||
BackgroundColour = DefaultBackgroundColour;
|
BackgroundColour = default_background_colour;
|
||||||
bubble.Colour = DefaultBubbleColour;
|
bubble.Colour = default_bubble_colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Select()
|
public void Select()
|
||||||
@ -87,8 +87,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose.RadioButtons
|
|||||||
isSelected = true;
|
isSelected = true;
|
||||||
Selected?.Invoke(this);
|
Selected?.Invoke(this);
|
||||||
|
|
||||||
BackgroundColour = SelectedBackgroundColour;
|
BackgroundColour = selected_background_colour;
|
||||||
bubble.Colour = SelectedBubbleColour;
|
bubble.Colour = selected_bubble_colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
protected override bool OnClick(InputState state)
|
||||||
|
@ -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.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
Loading…
Reference in New Issue
Block a user