mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 11:32:54 +08:00
Merge branch 'master' into beatmap_scores
This commit is contained in:
commit
62358c0b53
@ -139,6 +139,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
public void ScrollTo(Drawable section) => scrollContainer.ScrollTo(scrollContainer.GetChildPosInContent(section) - (FixedHeader?.BoundingBox.Height ?? 0));
|
public void ScrollTo(Drawable section) => scrollContainer.ScrollTo(scrollContainer.GetChildPosInContent(section) - (FixedHeader?.BoundingBox.Height ?? 0));
|
||||||
|
|
||||||
|
public void ScrollToTop() => scrollContainer.ScrollTo(0);
|
||||||
|
|
||||||
private float lastKnownScroll;
|
private float lastKnownScroll;
|
||||||
protected override void UpdateAfterChildren()
|
protected override void UpdateAfterChildren()
|
||||||
{
|
{
|
||||||
|
@ -255,6 +255,22 @@ namespace osu.Game
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eventually informational overlays should be displayed in a stack, but for now let's only allow one to stay open at a time.
|
||||||
|
var informationalOverlays = new OverlayContainer[] { beatmapSetOverlay, userProfile };
|
||||||
|
foreach (var overlay in informationalOverlays)
|
||||||
|
{
|
||||||
|
overlay.StateChanged += state =>
|
||||||
|
{
|
||||||
|
if (state == Visibility.Hidden) return;
|
||||||
|
|
||||||
|
foreach (var c in informationalOverlays)
|
||||||
|
{
|
||||||
|
if (c == overlay) continue;
|
||||||
|
c.State = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
settings.StateChanged += delegate
|
settings.StateChanged += delegate
|
||||||
{
|
{
|
||||||
switch (settings.State)
|
switch (settings.State)
|
||||||
|
@ -74,20 +74,18 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Right = metadata_width + BeatmapSetOverlay.RIGHT_WIDTH + spacing * 2 },
|
Padding = new MarginPadding { Right = metadata_width + BeatmapSetOverlay.RIGHT_WIDTH + spacing * 2 },
|
||||||
Child = new ScrollContainer
|
Child = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
ScrollbarVisible = false,
|
|
||||||
Child = description = new MetadataSection("Description"),
|
Child = description = new MetadataSection("Description"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new ScrollContainer
|
new Container
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Width = metadata_width,
|
Width = metadata_width,
|
||||||
ScrollbarVisible = false,
|
|
||||||
Padding = new MarginPadding { Horizontal = 10 },
|
Padding = new MarginPadding { Horizontal = 10 },
|
||||||
Margin = new MarginPadding { Right = BeatmapSetOverlay.RIGHT_WIDTH + spacing },
|
Margin = new MarginPadding { Right = BeatmapSetOverlay.RIGHT_WIDTH + spacing },
|
||||||
Child = new FillFlowContainer
|
Child = new FillFlowContainer
|
||||||
|
@ -33,6 +33,8 @@ namespace osu.Game.Overlays
|
|||||||
private RulesetStore rulesets;
|
private RulesetStore rulesets;
|
||||||
private GetScoresRequest getScoresRequest;
|
private GetScoresRequest getScoresRequest;
|
||||||
|
|
||||||
|
private readonly ScrollContainer scroll;
|
||||||
|
|
||||||
// receive input outside our bounds so we can trigger a close event on ourselves.
|
// receive input outside our bounds so we can trigger a close event on ourselves.
|
||||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
|
||||||
|
|
||||||
@ -64,7 +66,7 @@ namespace osu.Game.Overlays
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = OsuColour.Gray(0.2f)
|
Colour = OsuColour.Gray(0.2f)
|
||||||
},
|
},
|
||||||
new ScrollContainer
|
scroll = new ScrollContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
ScrollbarVisible = false,
|
ScrollbarVisible = false,
|
||||||
@ -149,6 +151,7 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
header.BeatmapSet = info.BeatmapSet = set;
|
header.BeatmapSet = info.BeatmapSet = set;
|
||||||
Show();
|
Show();
|
||||||
|
scroll.ScrollTo(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,6 +164,7 @@ namespace osu.Game.Overlays
|
|||||||
}
|
}
|
||||||
|
|
||||||
Show();
|
Show();
|
||||||
|
sectionsContainer.ScrollToTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void userLoadComplete(User user)
|
private void userLoadComplete(User user)
|
||||||
|
@ -231,6 +231,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void applyRateFromMods()
|
private void applyRateFromMods()
|
||||||
{
|
{
|
||||||
|
if (adjustableSourceClock == null) return;
|
||||||
|
|
||||||
adjustableSourceClock.Rate = 1;
|
adjustableSourceClock.Rate = 1;
|
||||||
foreach (var mod in Beatmap.Value.Mods.Value.OfType<IApplicableToClock>())
|
foreach (var mod in Beatmap.Value.Mods.Value.OfType<IApplicableToClock>())
|
||||||
mod.ApplyToClock(adjustableSourceClock);
|
mod.ApplyToClock(adjustableSourceClock);
|
||||||
|
Loading…
Reference in New Issue
Block a user