Adjust appearance a third time

This commit is contained in:
Bartłomiej Dach 2024-11-12 14:26:13 +01:00
parent dba065302d
commit 8458756402
No known key found for this signature in database
4 changed files with 42 additions and 37 deletions

View File

@ -3,21 +3,42 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds;
using osu.Game.Rulesets.Mania.Skinning.Default;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Mania.Edit.Blueprints.Components
{
public partial class EditBodyPiece : DefaultBodyPiece
public partial class EditBodyPiece : CompositeDrawable
{
private readonly Container border;
public EditBodyPiece()
{
InternalChildren = new Drawable[]
{
border = new Container
{
RelativeSizeAxes = Axes.Both,
Masking = true,
BorderThickness = 3,
Child = new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
AlwaysPresent = true,
},
},
};
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
AccentColour.Value = colours.Yellow;
Background.Alpha = 0.5f;
border.BorderColour = colours.YellowDarker;
}
protected override Drawable CreateForeground() => base.CreateForeground().With(d => d.Alpha = 0);
}
}

View File

@ -27,9 +27,6 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints.Components
{
Height = DefaultNotePiece.NOTE_HEIGHT;
CornerRadius = 5;
Masking = true;
InternalChild = new EditNotePiece
{
RelativeSizeAxes = Axes.Both,

View File

@ -2,12 +2,10 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Rulesets.Mania.Skinning.Default;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osuTK;
@ -17,24 +15,21 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints.Components
{
public partial class EditNotePiece : CompositeDrawable
{
private readonly Container border;
private readonly Box box;
[Resolved]
private Column? column { get; set; }
public EditNotePiece()
{
Masking = true;
CornerRadius = 5;
Height = DefaultNotePiece.NOTE_HEIGHT;
InternalChildren = new Drawable[]
{
new Container
border = new Container
{
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerRadius = 5,
BorderThickness = 5,
BorderColour = Color4.White.Opacity(0.7f),
BorderThickness = 3,
Child = new Box
{
RelativeSizeAxes = Axes.Both,
@ -42,10 +37,10 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints.Components
AlwaysPresent = true,
},
},
new Box
box = new Box
{
RelativeSizeAxes = Axes.X,
Height = 10,
Height = 3,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
},
@ -55,7 +50,8 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints.Components
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Colour = colours.Yellow;
border.BorderColour = colours.YellowDark;
box.Colour = colours.YellowLight;
}
protected override void Update()

View File

@ -47,6 +47,12 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
{
InternalChildren = new Drawable[]
{
new EditBodyPiece
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
},
head = new EditHoldNoteEndPiece
{
RelativeSizeAxes = Axes.X,
@ -88,21 +94,6 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
},
DragEnded = () => changeHandler?.EndChange(),
},
new Container
{
RelativeSizeAxes = Axes.Both,
Masking = true,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
BorderThickness = 1,
BorderColour = colours.Yellow,
Child = new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
AlwaysPresent = true,
}
}
};
}