mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Recolour elements of editor setup screen to match dropdown theming
This commit is contained in:
@ -1,12 +1,15 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
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.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Overlays;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterfaceV2
|
namespace osu.Game.Graphics.UserInterfaceV2
|
||||||
@ -44,6 +47,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected readonly T Component;
|
protected readonly T Component;
|
||||||
|
|
||||||
|
private readonly Box background;
|
||||||
private readonly GridContainer grid;
|
private readonly GridContainer grid;
|
||||||
private readonly OsuTextFlowContainer labelText;
|
private readonly OsuTextFlowContainer labelText;
|
||||||
private readonly OsuTextFlowContainer descriptionText;
|
private readonly OsuTextFlowContainer descriptionText;
|
||||||
@ -62,10 +66,9 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
background = new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Color4Extensions.FromHex("1c2125"),
|
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -146,9 +149,10 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OsuColour osuColour)
|
private void load(OverlayColourProvider? colourProvider, OsuColour osuColour)
|
||||||
{
|
{
|
||||||
|
background.Colour = colourProvider?.Background4 ?? Color4Extensions.FromHex(@"1c2125");
|
||||||
descriptionText.Colour = osuColour.Yellow;
|
descriptionText.Colour = osuColour.Yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
@ -10,6 +12,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
|
using osu.Game.Overlays;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -66,11 +69,11 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OsuColour colours)
|
private void load(OverlayColourProvider? colourProvider, OsuColour colours)
|
||||||
{
|
{
|
||||||
enabledColour = colours.BlueDark;
|
enabledColour = colourProvider?.Highlight1 ?? colours.BlueDark;
|
||||||
disabledColour = colours.Gray3;
|
disabledColour = colourProvider?.Background3 ?? colours.Gray3;
|
||||||
|
|
||||||
switchContainer.Colour = enabledColour;
|
switchContainer.Colour = enabledColour;
|
||||||
fill.Colour = disabledColour;
|
fill.Colour = disabledColour;
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
Colour = ColourProvider.Dark4,
|
Colour = ColourProvider.Background3,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
roundedContent = new Container
|
roundedContent = new Container
|
||||||
|
Reference in New Issue
Block a user