-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1458 from andy840119/show-the-fucking-toast
Should show the toast after copied or pasted.
- Loading branch information
Showing
3 changed files
with
80 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.ComponentModel; | ||
using osu.Framework.Extensions; | ||
using osu.Framework.Localisation; | ||
using osu.Game.Overlays.OSD; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Edit.Lyrics | ||
{ | ||
public class ClipboardToast : Toast | ||
{ | ||
public ClipboardToast(LyricEditorMode mode, ClipboardAction action) | ||
: base(getDescription(), getValue(action), getShortcut(mode, action)) | ||
{ | ||
} | ||
|
||
private static LocalisableString getDescription() | ||
=> "Lyric editor"; | ||
|
||
private static LocalisableString getValue(ClipboardAction action) | ||
=> action.GetDescription(); | ||
|
||
private static LocalisableString getShortcut(LyricEditorMode mode, ClipboardAction action) | ||
=> $"Lyric has been {action.GetDescription().ToLower()} in the {action.GetDescription().ToLower()} mode."; | ||
} | ||
|
||
public enum ClipboardAction | ||
{ | ||
[Description("Cut")] | ||
Cut, | ||
|
||
[Description("Copy")] | ||
Copy, | ||
|
||
[Description("Paste")] | ||
Paste | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters