mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 02:52:54 +08:00
Merge branch 'fix-slider-ball-positional' into better-player-flags
This commit is contained in:
commit
e9eb33a1b1
@ -6,6 +6,7 @@ using System.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osuTK.Graphics;
|
||||
@ -14,7 +15,7 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class SliderBall : CircularContainer, ISliderProgress
|
||||
public class SliderBall : CircularContainer, ISliderProgress, IRequireHighFrequencyMousePosition
|
||||
{
|
||||
private const float width = 128;
|
||||
|
||||
@ -107,18 +108,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
|
||||
private Vector2? lastScreenSpaceMousePosition;
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
lastScreenSpaceMousePosition = e.ScreenSpaceMousePosition;
|
||||
return base.OnMouseDown(e);
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(MouseUpEvent e)
|
||||
{
|
||||
lastScreenSpaceMousePosition = e.ScreenSpaceMousePosition;
|
||||
return base.OnMouseUp(e);
|
||||
}
|
||||
|
||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||
{
|
||||
lastScreenSpaceMousePosition = e.ScreenSpaceMousePosition;
|
||||
|
@ -390,11 +390,9 @@ namespace osu.Game
|
||||
logoContainer = new Container { RelativeSizeAxes = Axes.Both },
|
||||
}
|
||||
},
|
||||
overlayContent = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
floatingOverlayContent = new Container { RelativeSizeAxes = Axes.Both, Depth = float.MinValue },
|
||||
overlayContent = new Container { RelativeSizeAxes = Axes.Both },
|
||||
floatingOverlayContent = new Container { RelativeSizeAxes = Axes.Both },
|
||||
topMostOverlayContent = new Container { RelativeSizeAxes = Axes.Both },
|
||||
idleTracker = new GameIdleTracker(6000)
|
||||
});
|
||||
|
||||
@ -414,13 +412,12 @@ namespace osu.Game
|
||||
|
||||
loadComponentSingleFile(Toolbar = new Toolbar
|
||||
{
|
||||
Depth = -5,
|
||||
OnHome = delegate
|
||||
{
|
||||
CloseAllOverlays(false);
|
||||
menuScreen?.MakeCurrent();
|
||||
},
|
||||
}, floatingOverlayContent.Add);
|
||||
}, topMostOverlayContent.Add);
|
||||
|
||||
loadComponentSingleFile(volume = new VolumeOverlay(), floatingOverlayContent.Add);
|
||||
loadComponentSingleFile(onscreenDisplay = new OnScreenDisplay(), Add);
|
||||
@ -428,47 +425,32 @@ namespace osu.Game
|
||||
loadComponentSingleFile(screenshotManager, Add);
|
||||
|
||||
//overlay elements
|
||||
loadComponentSingleFile(direct = new DirectOverlay { Depth = -1 }, overlayContent.Add);
|
||||
loadComponentSingleFile(social = new SocialOverlay { Depth = -1 }, overlayContent.Add);
|
||||
loadComponentSingleFile(direct = new DirectOverlay(), overlayContent.Add);
|
||||
loadComponentSingleFile(social = new SocialOverlay(), overlayContent.Add);
|
||||
loadComponentSingleFile(channelManager = new ChannelManager(), AddInternal);
|
||||
loadComponentSingleFile(chatOverlay = new ChatOverlay { Depth = -1 }, overlayContent.Add);
|
||||
loadComponentSingleFile(settings = new MainSettings
|
||||
loadComponentSingleFile(chatOverlay = new ChatOverlay(), overlayContent.Add);
|
||||
loadComponentSingleFile(settings = new MainSettings { GetToolbarHeight = () => ToolbarOffset }, floatingOverlayContent.Add);
|
||||
loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add);
|
||||
loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add);
|
||||
loadComponentSingleFile(notifications = new NotificationOverlay
|
||||
{
|
||||
GetToolbarHeight = () => ToolbarOffset,
|
||||
Depth = -1
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
}, floatingOverlayContent.Add);
|
||||
loadComponentSingleFile(userProfile = new UserProfileOverlay { Depth = -2 }, overlayContent.Add);
|
||||
loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay { Depth = -3 }, overlayContent.Add);
|
||||
|
||||
loadComponentSingleFile(musicController = new MusicController
|
||||
{
|
||||
Depth = -5,
|
||||
Position = new Vector2(0, Toolbar.HEIGHT),
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
}, floatingOverlayContent.Add);
|
||||
|
||||
loadComponentSingleFile(notifications = new NotificationOverlay
|
||||
{
|
||||
GetToolbarHeight = () => ToolbarOffset,
|
||||
Depth = -4,
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
}, floatingOverlayContent.Add);
|
||||
loadComponentSingleFile(accountCreation = new AccountCreationOverlay(), topMostOverlayContent.Add);
|
||||
|
||||
loadComponentSingleFile(accountCreation = new AccountCreationOverlay
|
||||
{
|
||||
Depth = -6,
|
||||
}, floatingOverlayContent.Add);
|
||||
loadComponentSingleFile(dialogOverlay = new DialogOverlay(), topMostOverlayContent.Add);
|
||||
|
||||
loadComponentSingleFile(dialogOverlay = new DialogOverlay
|
||||
{
|
||||
Depth = -7,
|
||||
}, floatingOverlayContent.Add);
|
||||
|
||||
loadComponentSingleFile(externalLinkOpener = new ExternalLinkOpener
|
||||
{
|
||||
Depth = -8,
|
||||
}, floatingOverlayContent.Add);
|
||||
loadComponentSingleFile(externalLinkOpener = new ExternalLinkOpener(), topMostOverlayContent.Add);
|
||||
|
||||
dependencies.CacheAs(idleTracker);
|
||||
dependencies.Cache(settings);
|
||||
@ -714,6 +696,8 @@ namespace osu.Game
|
||||
|
||||
private Container floatingOverlayContent;
|
||||
|
||||
private Container topMostOverlayContent;
|
||||
|
||||
private FrameworkConfigManager frameworkConfig;
|
||||
private ScalingContainer screenContainer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user