mirror of
https://github.com/ppy/osu.git
synced 2026-06-03 06:09:54 +08:00
Adjust panel x offsets to match user expectations better
This commit is contained in:
@@ -26,7 +26,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
{
|
||||
private const float corner_radius = 10;
|
||||
|
||||
private const float active_x_offset = 50f;
|
||||
private const float active_x_offset = 25f;
|
||||
|
||||
protected const float DURATION = 400;
|
||||
|
||||
@@ -262,10 +262,15 @@ namespace osu.Game.Screens.SelectV2
|
||||
float x = PanelXOffset + corner_radius;
|
||||
|
||||
if (!Expanded.Value && !Selected.Value)
|
||||
x += active_x_offset;
|
||||
{
|
||||
if (this is PanelBeatmap)
|
||||
x += active_x_offset * 2;
|
||||
else
|
||||
x += active_x_offset * 4;
|
||||
}
|
||||
|
||||
if (!KeyboardSelected.Value)
|
||||
x += active_x_offset * 0.5f;
|
||||
x += active_x_offset;
|
||||
|
||||
TopLevelContent.MoveToX(x, DURATION, Easing.OutQuint);
|
||||
}
|
||||
|
||||
@@ -66,6 +66,11 @@ namespace osu.Game.Screens.SelectV2
|
||||
[Resolved]
|
||||
private ISongSelect? songSelect { get; set; }
|
||||
|
||||
public PanelBeatmap()
|
||||
{
|
||||
PanelXOffset = 60;
|
||||
}
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
|
||||
{
|
||||
var inputRectangle = TopLevelContent.DrawRectangle;
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
{
|
||||
new Dimension(GridSizeMode.Relative, 0.5f, maxSize: 660),
|
||||
new Dimension(),
|
||||
new Dimension(GridSizeMode.Relative, 0.5f, maxSize: 580),
|
||||
new Dimension(GridSizeMode.Relative, 0.5f, maxSize: 620),
|
||||
},
|
||||
Content = new[]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user