mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
Merge branch 'master' into fix-music-controller-regressed
This commit is contained in:
commit
99aa618f27
@ -17,6 +17,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public class OsuDropdown<T> : Dropdown<T>, IHasAccentColour
|
||||
{
|
||||
private const float corner_radius = 4;
|
||||
|
||||
private Color4 accentColour;
|
||||
|
||||
public Color4 AccentColour
|
||||
@ -57,9 +59,11 @@ namespace osu.Game.Graphics.UserInterface
|
||||
// todo: this uses the same styling as OsuMenu. hopefully we can just use OsuMenu in the future with some refactoring
|
||||
public OsuDropdownMenu()
|
||||
{
|
||||
CornerRadius = 4;
|
||||
CornerRadius = corner_radius;
|
||||
BackgroundColour = Color4.Black.Opacity(0.5f);
|
||||
|
||||
MaskingContainer.CornerRadius = corner_radius;
|
||||
|
||||
// todo: this uses the same styling as OsuMenu. hopefully we can just use OsuMenu in the future with some refactoring
|
||||
ItemsContainer.Padding = new MarginPadding(5);
|
||||
}
|
||||
@ -138,7 +142,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Foreground.Padding = new MarginPadding(2);
|
||||
|
||||
Masking = true;
|
||||
CornerRadius = 6;
|
||||
CornerRadius = corner_radius;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -237,7 +241,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
AutoSizeAxes = Axes.None;
|
||||
Margin = new MarginPadding { Bottom = 4 };
|
||||
CornerRadius = 4;
|
||||
CornerRadius = corner_radius;
|
||||
Height = 40;
|
||||
|
||||
Foreground.Children = new Drawable[]
|
||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
AddRangeInternal(new[]
|
||||
{
|
||||
DragBox = CreateDragBox(select),
|
||||
DragBox = CreateDragBox(selectBlueprintsFromDragRectangle),
|
||||
selectionHandler,
|
||||
SelectionBlueprints = CreateSelectionBlueprintContainer(),
|
||||
selectionHandler.CreateProxy(),
|
||||
@ -326,7 +326,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
/// Select all masks in a given rectangle selection area.
|
||||
/// </summary>
|
||||
/// <param name="rect">The rectangle to perform a selection on in screen-space coordinates.</param>
|
||||
private void select(RectangleF rect)
|
||||
private void selectBlueprintsFromDragRectangle(RectangleF rect)
|
||||
{
|
||||
foreach (var blueprint in SelectionBlueprints)
|
||||
{
|
||||
|
@ -398,7 +398,11 @@ namespace osu.Game.Screens.Edit
|
||||
break;
|
||||
}
|
||||
|
||||
LoadComponentAsync(currentScreen, screenContainer.Add);
|
||||
LoadComponentAsync(currentScreen, newScreen =>
|
||||
{
|
||||
if (newScreen == currentScreen)
|
||||
screenContainer.Add(newScreen);
|
||||
});
|
||||
}
|
||||
|
||||
private void seek(UIEvent e, int direction)
|
||||
|
Loading…
Reference in New Issue
Block a user