mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Merge branch 'master' into beatmap-refactor/playlist-use-api-beatmap-extended
This commit is contained in:
@ -108,11 +108,20 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
bool selectionPerformed = performMouseDownActions(e);
|
||||
|
||||
// even if a selection didn't occur, a drag event may still move the selection.
|
||||
bool movementPossible = prepareSelectionMovement();
|
||||
|
||||
return selectionPerformed || (e.Button == MouseButton.Left && movementPossible);
|
||||
// check if selection has occurred
|
||||
if (selectionPerformed)
|
||||
{
|
||||
// only unmodified right click should show context menu
|
||||
bool shouldShowContextMenu = e.Button == MouseButton.Right && !e.ShiftPressed && !e.AltPressed && !e.SuperPressed;
|
||||
|
||||
// stop propagation if not showing context menu
|
||||
return !shouldShowContextMenu;
|
||||
}
|
||||
|
||||
// even if a selection didn't occur, a drag event may still move the selection.
|
||||
return e.Button == MouseButton.Left && movementPossible;
|
||||
}
|
||||
|
||||
protected SelectionBlueprint<T> ClickedBlueprint { get; private set; }
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Select
|
||||
new PopupDialogOkButton
|
||||
{
|
||||
Text = @"Yes. Totally. Delete it.",
|
||||
Action = () => manager.Delete(beatmap),
|
||||
Action = () => manager?.Delete(beatmap),
|
||||
},
|
||||
new PopupDialogCancelButton
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
return string.Compare(BeatmapSet.Metadata.Title, otherSet.BeatmapSet.Metadata.Title, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
case SortMode.Author:
|
||||
return string.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username, StringComparison.OrdinalIgnoreCase);
|
||||
return string.Compare(BeatmapSet.Metadata.Author?.Username, otherSet.BeatmapSet.Metadata.Author?.Username, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
case SortMode.Source:
|
||||
return string.Compare(BeatmapSet.Metadata.Source, otherSet.BeatmapSet.Metadata.Source, StringComparison.OrdinalIgnoreCase);
|
||||
|
@ -142,7 +142,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = $"{(beatmapInfo.Metadata ?? beatmapInfo.BeatmapSet.Metadata).Author.Username}",
|
||||
Text = $"{(beatmapInfo.Metadata ?? beatmapInfo.BeatmapSet.Metadata).Author?.Username ?? string.Empty}",
|
||||
Font = OsuFont.GetFont(italics: true),
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft
|
||||
|
Reference in New Issue
Block a user