mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:03:08 +08:00
Add ability for player loading screen settings to scroll
As we add more items here this is going to become necessary. Until the design no doubt gets changed.
This commit is contained in:
parent
a38eb426ef
commit
9c43500ad3
@ -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,20 +160,27 @@ namespace osu.Game.Screens.Play
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
PlayerSettings = new FillFlowContainer<PlayerSettingsGroup>
|
||||
new OsuScrollContainer
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 20),
|
||||
Margin = new MarginPadding(25),
|
||||
Children = new PlayerSettingsGroup[]
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Width = SettingsToolboxGroup.CONTAINER_WIDTH + padding * 2,
|
||||
Padding = new MarginPadding { Vertical = padding },
|
||||
Masking = false,
|
||||
Child = PlayerSettings = new FillFlowContainer<PlayerSettingsGroup>
|
||||
{
|
||||
VisualSettings = new VisualSettings(),
|
||||
AudioSettings = new AudioSettings(),
|
||||
new InputSettings()
|
||||
}
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 20),
|
||||
Padding = new MarginPadding { Horizontal = padding },
|
||||
Children = new PlayerSettingsGroup[]
|
||||
{
|
||||
VisualSettings = new VisualSettings(),
|
||||
AudioSettings = new AudioSettings(),
|
||||
new InputSettings()
|
||||
}
|
||||
},
|
||||
},
|
||||
idleTracker = new IdleTracker(750),
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user