mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge branch 'master' into update-framework
This commit is contained in:
@ -10,6 +10,7 @@ using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@ -49,8 +50,8 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OsuSpriteText { Text = "Sample content" },
|
||||
new TriangleButton { Text = "can't puush me", Width = 200, },
|
||||
new TriangleButton { Text = "puush me", Width = 200, Action = () => { } },
|
||||
new RoundedButton { Text = "can't puush me", Width = 200, },
|
||||
new RoundedButton { Text = "puush me", Width = 200, Action = () => { } },
|
||||
}
|
||||
},
|
||||
overlay = new TestLoadingLayer(true),
|
||||
|
@ -33,7 +33,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
Text = @"No OverlayColourProvider",
|
||||
Font = OsuFont.Default.With(size: 40)
|
||||
},
|
||||
new TriangleButtonWithPopover()
|
||||
new RoundedButtonWithPopover()
|
||||
}
|
||||
};
|
||||
|
||||
@ -50,15 +50,15 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
Text = @"With OverlayColourProvider (orange)",
|
||||
Font = OsuFont.Default.With(size: 40)
|
||||
},
|
||||
new TriangleButtonWithPopover()
|
||||
new RoundedButtonWithPopover()
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private partial class TriangleButtonWithPopover : TriangleButton, IHasPopover
|
||||
private partial class RoundedButtonWithPopover : RoundedButton, IHasPopover
|
||||
{
|
||||
public TriangleButtonWithPopover()
|
||||
public RoundedButtonWithPopover()
|
||||
{
|
||||
Width = 100;
|
||||
Height = 30;
|
||||
|
@ -9,7 +9,6 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Settings;
|
||||
@ -37,7 +36,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
},
|
||||
new SettingsButton
|
||||
{
|
||||
Text = "Test button",
|
||||
Text = "Test settings button",
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Enabled = { BindTarget = enabled },
|
||||
@ -56,8 +55,8 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
public void TestBackgroundColour()
|
||||
{
|
||||
AddStep("set red scheme", () => CreateThemedContent(OverlayColourScheme.Red));
|
||||
AddAssert("rounded button has correct colour", () => Cell(0, 1).ChildrenOfType<RoundedButton>().First().BackgroundColour == new OsuColour().Blue3);
|
||||
AddAssert("settings button has correct colour", () => Cell(0, 1).ChildrenOfType<SettingsButton>().First().BackgroundColour == new OverlayColourProvider(OverlayColourScheme.Red).Highlight1);
|
||||
AddAssert("rounded button has correct colour", () => Cell(0, 1).ChildrenOfType<RoundedButton>().First().BackgroundColour == new OverlayColourProvider(OverlayColourScheme.Red).Colour3);
|
||||
AddAssert("settings button has correct colour", () => Cell(0, 1).ChildrenOfType<SettingsButton>().First().BackgroundColour == new OverlayColourProvider(OverlayColourScheme.Red).Colour3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ using osu.Framework.Screens;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osu.Game.Screens;
|
||||
using osuTK;
|
||||
|
||||
@ -109,7 +110,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = Title,
|
||||
},
|
||||
new TriangleButton
|
||||
new RoundedButton
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
|
Reference in New Issue
Block a user