mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Add temporary fix for null references
This commit is contained in:
@ -26,13 +26,17 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
DrawableNote note = position == HoldNotePosition.Start ? DrawableObject.Head : DrawableObject.Tail;
|
// Todo: This shouldn't exist, mania should not reference the drawable hitobject directly.
|
||||||
|
if (DrawableObject.IsLoaded)
|
||||||
|
{
|
||||||
|
DrawableNote note = position == HoldNotePosition.Start ? DrawableObject.Head : DrawableObject.Tail;
|
||||||
|
|
||||||
Anchor = note.Anchor;
|
Anchor = note.Anchor;
|
||||||
Origin = note.Origin;
|
Origin = note.Origin;
|
||||||
|
|
||||||
Size = note.DrawSize;
|
Size = note.DrawSize;
|
||||||
Position = note.DrawPosition;
|
Position = note.DrawPosition;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Todo: This is temporary, since the note masks don't do anything special yet. In the future they will handle input.
|
// Todo: This is temporary, since the note masks don't do anything special yet. In the future they will handle input.
|
||||||
|
@ -54,13 +54,17 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
Size = DrawableObject.DrawSize + new Vector2(0, DrawableObject.Tail.DrawHeight);
|
// Todo: This shouldn't exist, mania should not reference the drawable hitobject directly.
|
||||||
|
if (DrawableObject.IsLoaded)
|
||||||
|
{
|
||||||
|
Size = DrawableObject.DrawSize + new Vector2(0, DrawableObject.Tail.DrawHeight);
|
||||||
|
|
||||||
// This is a side-effect of not matching the hitobject's anchors/origins, which is kinda hard to do
|
// This is a side-effect of not matching the hitobject's anchors/origins, which is kinda hard to do
|
||||||
// When scrolling upwards our origin is already at the top of the head note (which is the intended location),
|
// When scrolling upwards our origin is already at the top of the head note (which is the intended location),
|
||||||
// but when scrolling downwards our origin is at the _bottom_ of the tail note (where we need to be at the _top_ of the tail note)
|
// but when scrolling downwards our origin is at the _bottom_ of the tail note (where we need to be at the _top_ of the tail note)
|
||||||
if (direction.Value == ScrollingDirection.Down)
|
if (direction.Value == ScrollingDirection.Down)
|
||||||
Y -= DrawableObject.Tail.DrawHeight;
|
Y -= DrawableObject.Tail.DrawHeight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Quad SelectionQuad => ScreenSpaceDrawQuad;
|
public override Quad SelectionQuad => ScreenSpaceDrawQuad;
|
||||||
|
@ -19,7 +19,9 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
Size = DrawableObject.DrawSize;
|
// Todo: This shouldn't exist, mania should not reference the drawable hitobject directly.
|
||||||
|
if (DrawableObject.IsLoaded)
|
||||||
|
Size = DrawableObject.DrawSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user