mirror of
https://github.com/ppy/osu
synced 2025-02-03 11:51:54 +00:00
Move action to private named method to avoid null inspection
This commit is contained in:
parent
6197ef426d
commit
36d99a2e34
@ -37,11 +37,7 @@ namespace osu.Game.Overlays
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Margin = new MarginPadding(20),
|
||||
Action = () =>
|
||||
{
|
||||
ScrollToStart();
|
||||
Button.State = Visibility.Hidden;
|
||||
}
|
||||
Action = scrollToTop
|
||||
});
|
||||
}
|
||||
|
||||
@ -58,6 +54,12 @@ namespace osu.Game.Overlays
|
||||
Button.State = Target > button_scroll_position ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
|
||||
private void scrollToTop()
|
||||
{
|
||||
ScrollToStart();
|
||||
Button.State = Visibility.Hidden;
|
||||
}
|
||||
|
||||
public class ScrollToTopButton : OsuHoverContainer
|
||||
{
|
||||
private const int fade_duration = 500;
|
||||
|
Loading…
Reference in New Issue
Block a user