Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Commit

Permalink
Merge branch 'daily' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Feb 9, 2021
2 parents c897b11 + 82e9656 commit d414586
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 14 deletions.
2 changes: 1 addition & 1 deletion osu.Desktop/osu.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Product>osu!lazer</Product>
<ApplicationIcon>lazer.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Version>2021.205.1</Version>
<Version>2021.209.0</Version>
<FileVersion>0.0.0</FileVersion>
</PropertyGroup>
<PropertyGroup>
Expand Down
5 changes: 4 additions & 1 deletion osu.Game/Screens/Menu/Disclaimer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public Disclaimer(OsuScreen nextScreen = null, bool showDisclaimer = false)
[Resolved(CanBeNull = true)]
private OsuGame game { get; set; }

[Resolved]
private GameHost host { get; set; }

[Resolved]
private MConfigManager mConfig { get; set; }

Expand Down Expand Up @@ -203,7 +206,7 @@ public override void OnEntering(IScreen last)
fill.FadeOut();

var displayDelay = enableAvatarSprite ? 1000 : 0;
bool fadeInWindowOnEnter = mConfig.Get<bool>(MSetting.FadeInWindowWhenEntering);
bool fadeInWindowOnEnter = mConfig.Get<bool>(MSetting.FadeInWindowWhenEntering) && host.Window is SDL2DesktopWindow;
avatarSprite?.FadeIn(fadeInWindowOnEnter ? 0 : 500);

if (showDisclaimer) //显示Disclaimer时要提供的动画过程
Expand Down
6 changes: 4 additions & 2 deletions osu.Game/Screens/Mvis/Collections/Interface/BeatmapPiece.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class BeatmapPiece : CompositeDrawable
private Box hover;
private FillFlowContainer maskFillFlow;
private Box bgBox;
private Container content;
private ShakeContainer content;

public BeatmapPiece(WorkingBeatmap b)
{
Expand All @@ -51,7 +51,7 @@ public BeatmapPiece(WorkingBeatmap b)
[BackgroundDependencyLoader]
private void load()
{
InternalChild = content = new Container
InternalChild = content = new ShakeContainer
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Expand Down Expand Up @@ -242,6 +242,8 @@ protected override bool OnClick(ClickEvent e)
b.Value = Beatmap;
controller.Play();
}
else
content.Shake();

return base.OnClick(e);
}
Expand Down
36 changes: 26 additions & 10 deletions osu.Game/Screens/Mvis/MvisScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Audio;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
Expand Down Expand Up @@ -51,9 +52,10 @@ namespace osu.Game.Screens.Mvis
public class MvisScreen : ScreenWithBeatmapBackground, IKeyBindingHandler<GlobalAction>
{
public override bool HideOverlaysOnEnter => true;
private bool allowCursor;
public override bool AllowBackButton => false;
public override bool CursorVisible => allowCursor;

public override bool CursorVisible => !overlaysHidden || sidebar.State.Value == Visibility.Visible; //隐藏界面或侧边栏可见,显示光标

public override bool AllowRateAdjustments => true;

private bool canReallyHide =>
Expand Down Expand Up @@ -120,7 +122,12 @@ protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnl
#region overlay

private LoadingSpinner loadingSpinner;
private Sidebar sidebar;

private readonly Sidebar sidebar = new Sidebar
{
Name = "Sidebar Container",
Padding = new MarginPadding { Right = HORIZONTAL_OVERFLOW_PADDING }
};

#endregion

Expand Down Expand Up @@ -171,6 +178,7 @@ protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnl
private DrawableTrack track => musicController.CurrentTrack;

private WorkingBeatmap prevBeatmap;
private Box dimBox;

#endregion

Expand Down Expand Up @@ -255,17 +263,19 @@ private void load(MConfigManager config, IdleTracker idleTracker)
Depth = float.MinValue,
Children = new Drawable[]
{
dimBox = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black.Opacity(0.6f),
Alpha = 0
},
loadingSpinner = new LoadingSpinner(true, true)
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Margin = new MarginPadding(115)
},
sidebar = new Sidebar
{
Name = "Sidebar Container",
Padding = new MarginPadding { Right = HORIZONTAL_OVERFLOW_PADDING }
},
sidebar,
skinnableBbBackground = new FullScreenSkinnableComponent("MBottomBar-background",
confineMode: ConfineMode.ScaleToFill,
masking: true,
Expand Down Expand Up @@ -571,6 +581,14 @@ protected override void LoadComplete()
}
}, true);

sidebar.State.BindValueChanged(v =>
{
if (v.NewValue == Visibility.Visible)
dimBox.FadeIn(500, Easing.OutQuint);
else
dimBox.FadeOut(500, Easing.OutQuint);
});

showOverlays(true);

base.LoadComplete();
Expand Down Expand Up @@ -814,7 +832,6 @@ private void hideOverlays(bool force)
progressBar.MoveToY(5, duration, Easing.OutQuint);
bottomBar.FadeOut(duration, Easing.OutQuint);

allowCursor = false;
overlaysHidden = true;
updateIdleVisuals();
}
Expand All @@ -836,7 +853,6 @@ private void showOverlays(bool force)
progressBar.MoveToY(0, duration, Easing.OutQuint);
bottomBar.FadeIn(duration, Easing.OutQuint);

allowCursor = true;
overlaysHidden = false;

applyBackgroundBrightness();
Expand Down

0 comments on commit d414586

Please sign in to comment.