mirror of
https://github.com/osukey/osukey.git
synced 2025-05-17 11:37:32 +09:00
Use fade instead of negative margin
This commit is contained in:
parent
2d6d9dd723
commit
d9872dda12
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -185,8 +185,6 @@ namespace osu.Game.Screens.Select
|
|||||||
source.Text = Beatmap.Metadata.Source;
|
source.Text = Beatmap.Metadata.Source;
|
||||||
tags.Text = Beatmap.Metadata.Tags;
|
tags.Text = Beatmap.Metadata.Tags;
|
||||||
|
|
||||||
tags.Margin = new MarginPadding { Top = string.IsNullOrEmpty(Beatmap.Metadata.Source) ? -2 * spacing : 0 };
|
|
||||||
|
|
||||||
var requestedBeatmap = Beatmap;
|
var requestedBeatmap = Beatmap;
|
||||||
if (requestedBeatmap.Metrics == null)
|
if (requestedBeatmap.Metrics == null)
|
||||||
{
|
{
|
||||||
@ -333,21 +331,18 @@ namespace osu.Game.Screens.Select
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public MarginPadding Margin
|
|
||||||
{
|
|
||||||
set => textContainer.Margin = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Text
|
public string Text
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(value))
|
if (string.IsNullOrEmpty(value))
|
||||||
{
|
{
|
||||||
textContainer.FadeOut(transition_duration);
|
this.FadeOut(transition_duration);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.FadeIn(transition_duration);
|
||||||
|
|
||||||
setTextAsync(value);
|
setTextAsync(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user