Merge branch 'master' into fix-music-controller-regressed

This commit is contained in:
Dan Balasescu 2020-09-08 21:54:55 +09:00 committed by GitHub
commit 99aa618f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View File

@ -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[]

View File

@ -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)
{

View File

@ -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)