mirror of
https://github.com/ppy/osu
synced 2025-03-06 11:28:12 +00:00
Merge pull request #17070 from peppy/player-loader-settings-scroll
Add ability for player loading screen settings to scroll
This commit is contained in:
commit
55ddb6943c
@ -22,8 +22,9 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
public class SettingsToolboxGroup : Container, IExpandable
|
||||
{
|
||||
public const int CONTAINER_WIDTH = 270;
|
||||
|
||||
private const float transition_duration = 250;
|
||||
private const int container_width = 270;
|
||||
private const int border_thickness = 2;
|
||||
private const int header_height = 30;
|
||||
private const int corner_radius = 5;
|
||||
@ -49,7 +50,7 @@ namespace osu.Game.Overlays
|
||||
public SettingsToolboxGroup(string title)
|
||||
{
|
||||
AutoSizeAxes = Axes.Y;
|
||||
Width = container_width;
|
||||
Width = CONTAINER_WIDTH;
|
||||
Masking = true;
|
||||
CornerRadius = corner_radius;
|
||||
BorderColour = Color4.Black;
|
||||
@ -201,7 +202,5 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e) => true;
|
||||
}
|
||||
}
|
||||
|
@ -143,6 +143,8 @@ namespace osu.Game.Screens.Play
|
||||
muteWarningShownOnce = sessionStatics.GetBindable<bool>(Static.MutedAudioNotificationShownOnce);
|
||||
batteryWarningShownOnce = sessionStatics.GetBindable<bool>(Static.LowBatteryNotificationShownOnce);
|
||||
|
||||
const float padding = 25;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
(content = new LogoTrackingContainer
|
||||
@ -158,14 +160,20 @@ namespace osu.Game.Screens.Play
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
PlayerSettings = new FillFlowContainer<PlayerSettingsGroup>
|
||||
new OsuScrollContainer
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Width = SettingsToolboxGroup.CONTAINER_WIDTH + padding * 2,
|
||||
Padding = new MarginPadding { Vertical = padding },
|
||||
Masking = false,
|
||||
Child = PlayerSettings = new FillFlowContainer<PlayerSettingsGroup>
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 20),
|
||||
Margin = new MarginPadding(25),
|
||||
Padding = new MarginPadding { Horizontal = padding },
|
||||
Children = new PlayerSettingsGroup[]
|
||||
{
|
||||
VisualSettings = new VisualSettings(),
|
||||
@ -173,6 +181,7 @@ namespace osu.Game.Screens.Play
|
||||
new InputSettings()
|
||||
}
|
||||
},
|
||||
},
|
||||
idleTracker = new IdleTracker(750),
|
||||
}),
|
||||
lowPassFilter = new AudioFilter(audio.TrackMixer),
|
||||
|
Loading…
Reference in New Issue
Block a user