mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 09:32:55 +08:00
Hide osu! playfield cursor
This commit is contained in:
parent
efa39f38ca
commit
677f3653eb
13
osu.Game.Rulesets.Osu/Edit/OsuEditPlayfield.cs
Normal file
13
osu.Game.Rulesets.Osu/Edit/OsuEditPlayfield.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
|
using osu.Game.Rulesets.Osu.UI;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Osu.Edit
|
||||||
|
{
|
||||||
|
public class OsuEditPlayfield : OsuPlayfield
|
||||||
|
{
|
||||||
|
protected override CursorContainer CreateCursor() => null;
|
||||||
|
}
|
||||||
|
}
|
19
osu.Game.Rulesets.Osu/Edit/OsuEditRulesetContainer.cs
Normal file
19
osu.Game.Rulesets.Osu/Edit/OsuEditRulesetContainer.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Rulesets.Osu.UI;
|
||||||
|
using osu.Game.Rulesets.UI;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Osu.Edit
|
||||||
|
{
|
||||||
|
public class OsuEditRulesetContainer : OsuRulesetContainer
|
||||||
|
{
|
||||||
|
public OsuEditRulesetContainer(Ruleset ruleset, WorkingBeatmap beatmap, bool isForCurrentRuleset)
|
||||||
|
: base(ruleset, beatmap, isForCurrentRuleset)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Playfield CreatePlayfield() => new OsuEditPlayfield();
|
||||||
|
}
|
||||||
|
}
|
@ -2,9 +2,11 @@
|
|||||||
// 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.Beatmaps;
|
||||||
using osu.Game.Rulesets.Edit;
|
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;
|
||||||
|
using osu.Game.Rulesets.UI;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Edit
|
namespace osu.Game.Rulesets.Osu.Edit
|
||||||
{
|
{
|
||||||
@ -15,6 +17,8 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override RulesetContainer CreateRulesetContainer(Ruleset ruleset, WorkingBeatmap beatmap) => new OsuEditRulesetContainer(ruleset, beatmap, true);
|
||||||
|
|
||||||
protected override IReadOnlyList<ICompositionTool> CompositionTools => new ICompositionTool[]
|
protected override IReadOnlyList<ICompositionTool> CompositionTools => new ICompositionTool[]
|
||||||
{
|
{
|
||||||
new HitObjectCompositionTool<HitCircle>(),
|
new HitObjectCompositionTool<HitCircle>(),
|
||||||
|
@ -13,6 +13,7 @@ using System.Linq;
|
|||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
using osu.Game.Rulesets.Osu.Judgements;
|
using osu.Game.Rulesets.Osu.Judgements;
|
||||||
using osu.Game.Rulesets.Osu.UI.Cursor;
|
using osu.Game.Rulesets.Osu.UI.Cursor;
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.UI
|
namespace osu.Game.Rulesets.Osu.UI
|
||||||
{
|
{
|
||||||
@ -65,7 +66,10 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
AddInternal(new GameplayCursor());
|
|
||||||
|
var cursor = CreateCursor();
|
||||||
|
if (cursor != null)
|
||||||
|
AddInternal(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Add(DrawableHitObject h)
|
public override void Add(DrawableHitObject h)
|
||||||
@ -102,5 +106,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
|
|
||||||
judgementLayer.Add(explosion);
|
judgementLayer.Add(explosion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual CursorContainer CreateCursor() => new GameplayCursor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,8 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Beatmaps\OsuBeatmapConverter.cs" />
|
<Compile Include="Beatmaps\OsuBeatmapConverter.cs" />
|
||||||
<Compile Include="Beatmaps\OsuBeatmapProcessor.cs" />
|
<Compile Include="Beatmaps\OsuBeatmapProcessor.cs" />
|
||||||
|
<Compile Include="Edit\OsuEditPlayfield.cs" />
|
||||||
|
<Compile Include="Edit\OsuEditRulesetContainer.cs" />
|
||||||
<Compile Include="Edit\OsuHitObjectComposer.cs" />
|
<Compile Include="Edit\OsuHitObjectComposer.cs" />
|
||||||
<Compile Include="Objects\Drawables\DrawableOsuHitObject.cs" />
|
<Compile Include="Objects\Drawables\DrawableOsuHitObject.cs" />
|
||||||
<Compile Include="Objects\Drawables\Connections\ConnectionRenderer.cs" />
|
<Compile Include="Objects\Drawables\Connections\ConnectionRenderer.cs" />
|
||||||
|
@ -11,6 +11,7 @@ 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.Beatmaps;
|
||||||
using osu.Game.Rulesets.Edit.Tools;
|
using osu.Game.Rulesets.Edit.Tools;
|
||||||
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;
|
||||||
@ -34,7 +35,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
RulesetContainer rulesetContainer;
|
RulesetContainer rulesetContainer;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
rulesetContainer = ruleset.CreateRulesetContainerWith(osuGame.Beatmap.Value, true);
|
rulesetContainer = CreateRulesetContainer(ruleset, osuGame.Beatmap.Value);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -99,6 +100,8 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual RulesetContainer CreateRulesetContainer(Ruleset ruleset, WorkingBeatmap beatmap) => ruleset.CreateRulesetContainerWith(beatmap, true);
|
||||||
|
|
||||||
protected abstract IReadOnlyList<ICompositionTool> CompositionTools { get; }
|
protected abstract IReadOnlyList<ICompositionTool> CompositionTools { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user