mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Manage subtitle inside of DownloadButton.
This commit is contained in:
@ -13,10 +13,15 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
|||||||
{
|
{
|
||||||
public class DownloadButton : HeaderButton
|
public class DownloadButton : HeaderButton
|
||||||
{
|
{
|
||||||
public DownloadButton(string title, string subtitle, BeatmapSetInfo set, bool noVideo = false)
|
public DownloadButton(BeatmapSetInfo set, bool noVideo = false)
|
||||||
{
|
{
|
||||||
Width = 120;
|
Width = 120;
|
||||||
|
|
||||||
|
string subtitle = string.Empty;
|
||||||
|
|
||||||
|
if (set.OnlineInfo.HasVideo)
|
||||||
|
subtitle = noVideo ? "without Video" : "with Video";
|
||||||
|
|
||||||
BeatmapSetDownloader downloader;
|
BeatmapSetDownloader downloader;
|
||||||
Add(new Container
|
Add(new Container
|
||||||
{
|
{
|
||||||
@ -36,7 +41,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
|||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = title,
|
Text = "Download",
|
||||||
TextSize = 13,
|
TextSize = 13,
|
||||||
Font = @"Exo2.0-Bold",
|
Font = @"Exo2.0-Bold",
|
||||||
},
|
},
|
||||||
|
@ -70,8 +70,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
{
|
{
|
||||||
videoButtons.Children = new[]
|
videoButtons.Children = new[]
|
||||||
{
|
{
|
||||||
new DownloadButton("Download", "with Video", BeatmapSet),
|
new DownloadButton(BeatmapSet),
|
||||||
new DownloadButton("Download", "without Video", BeatmapSet, true),
|
new DownloadButton(BeatmapSet, true),
|
||||||
};
|
};
|
||||||
|
|
||||||
videoButtons.FadeIn(transition_duration);
|
videoButtons.FadeIn(transition_duration);
|
||||||
@ -79,7 +79,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
noVideoButtons.Child = new DownloadButton("Download", string.Empty, BeatmapSet);
|
noVideoButtons.Child = new DownloadButton(BeatmapSet);
|
||||||
|
|
||||||
noVideoButtons.FadeIn(transition_duration);
|
noVideoButtons.FadeIn(transition_duration);
|
||||||
videoButtons.FadeOut(transition_duration);
|
videoButtons.FadeOut(transition_duration);
|
||||||
|
Reference in New Issue
Block a user