From 23332995d133672ec63e3c29e8859d58c5d8625a Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Thu, 9 Dec 2021 01:52:59 +0900 Subject: [PATCH] Invert naming of exposed actions --- osu.Game/Screens/OnlinePlay/DrawableRoomPlaylist.cs | 12 ++++++------ .../Screens/OnlinePlay/DrawableRoomPlaylistItem.cs | 4 ++-- .../Playlists/PlaylistsRoomSettingsPlaylist.cs | 2 +- .../OnlinePlay/Playlists/PlaylistsRoomSubScreen.cs | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylist.cs b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylist.cs index 1abc7c47d6..8bd2daa2c3 100644 --- a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylist.cs +++ b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylist.cs @@ -26,12 +26,12 @@ namespace osu.Game.Screens.OnlinePlay /// /// Invoked when an item is requested to be deleted. /// - public Action DeletionRequested; + public Action RequestDeletion; /// /// Invoked when an item requests its results to be shown. /// - public Action ShowResultsRequested; + public Action RequestResults; private bool allowReordering; @@ -54,7 +54,7 @@ namespace osu.Game.Screens.OnlinePlay /// /// Whether to allow deleting items from the playlist. - /// If true, requests to delete items may be satisfied via . + /// If true, requests to delete items may be satisfied via . /// public bool AllowDeletion { @@ -90,7 +90,7 @@ namespace osu.Game.Screens.OnlinePlay /// /// Whether to allow items to request their results to be shown. - /// If true, requests to show the results may be satisfied via . + /// If true, requests to show the results may be satisfied via . /// public bool AllowShowingResults { @@ -134,13 +134,13 @@ namespace osu.Game.Screens.OnlinePlay protected sealed override OsuRearrangeableListItem CreateOsuDrawable(PlaylistItem item) => CreateDrawablePlaylistItem(item).With(d => { d.SelectedItem.BindTarget = SelectedItem; - d.RequestDeletion = i => DeletionRequested?.Invoke(i); + d.RequestDeletion = i => RequestDeletion?.Invoke(i); d.AllowReordering = AllowReordering; d.AllowDeletion = AllowDeletion; d.AllowSelection = AllowSelection; d.AllowShowingResults = AllowShowingResults; d.ShowItemOwner = ShowItemOwners; - d.ShowResultsRequested = i => ShowResultsRequested?.Invoke(i); + d.RequestResults = i => RequestResults?.Invoke(i); }); protected virtual DrawableRoomPlaylistItem CreateDrawablePlaylistItem(PlaylistItem item) => new DrawableRoomPlaylistItem(item); diff --git a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs index fca944e9b6..7a1c069df3 100644 --- a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs +++ b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs @@ -48,7 +48,7 @@ namespace osu.Game.Screens.OnlinePlay /// /// Invoked when this item requests its results to be shown. /// - public Action ShowResultsRequested; + public Action RequestResults; /// /// The currently-selected item, used to show a border around this item. @@ -410,7 +410,7 @@ namespace osu.Game.Screens.OnlinePlay { showResultsButton = new ShowResultsButton { - Action = () => ShowResultsRequested?.Invoke(Item), + Action = () => RequestResults?.Invoke(Item), Alpha = AllowShowingResults ? 1 : 0, }, Item.Beatmap.Value == null ? Empty() : new PlaylistDownloadButton(Item), diff --git a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSettingsPlaylist.cs b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSettingsPlaylist.cs index bbe67e76e3..2fe215eef2 100644 --- a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSettingsPlaylist.cs +++ b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSettingsPlaylist.cs @@ -16,7 +16,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists AllowReordering = true; AllowDeletion = true; - DeletionRequested = item => + RequestDeletion = item => { var nextItem = Items.GetNext(item); diff --git a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSubScreen.cs index dd2d22b742..4114a5e9a0 100644 --- a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSubScreen.cs @@ -95,7 +95,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists SelectedItem = { BindTarget = SelectedItem }, AllowSelection = true, AllowShowingResults = true, - ShowResultsRequested = item => + RequestResults = item => { Debug.Assert(RoomId.Value != null); ParentScreen?.Push(new PlaylistsResultsScreen(null, RoomId.Value.Value, item, false));