1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix selection masks not having the correct size

This commit is contained in:
smoogipoo 2018-11-06 16:16:52 +09:00
parent c4be2af498
commit 4b1b494893
3 changed files with 25 additions and 4 deletions

View File

@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces;
using osu.Game.Rulesets.Mania.UI;
@ -15,7 +14,7 @@ using OpenTK.Graphics;
namespace osu.Game.Rulesets.Mania.Edit.Blueprints
{
public class HoldNoteSelectionBlueprint : SelectionBlueprint
public class HoldNoteSelectionBlueprint : ManiaSelectionBlueprint
{
public new DrawableHoldNote HitObject => (DrawableHoldNote)base.HitObject;
@ -26,6 +25,8 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
public HoldNoteSelectionBlueprint(DrawableHoldNote hold)
: base(hold)
{
RelativeSizeAxes = Axes.None;
InternalChildren = new Drawable[]
{
new HoldNoteNoteSelectionBlueprint(hold.Head),

View File

@ -2,18 +2,20 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces;
namespace osu.Game.Rulesets.Mania.Edit.Blueprints
{
public class NoteSelectionBlueprint : SelectionBlueprint
public class NoteSelectionBlueprint : ManiaSelectionBlueprint
{
public NoteSelectionBlueprint(DrawableNote note)
: base(note)
{
RelativeSizeAxes = Axes.None;
Scale = note.Scale;
CornerRadius = 5;

View File

@ -0,0 +1,18 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Mania.Edit.Masks
{
public abstract class ManiaSelectionBlueprint : SelectionBlueprint
{
protected ManiaSelectionBlueprint(DrawableHitObject hitObject)
: base(hitObject)
{
RelativeSizeAxes = Axes.None;
}
}
}