mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Fix masking of song bar
This commit is contained in:
parent
1ab4713ef6
commit
c9e2ee8f56
@ -48,14 +48,23 @@ namespace osu.Game.Tournament.Components
|
||||
private Container panelContents;
|
||||
private Container innerPanel;
|
||||
private Container outerPanel;
|
||||
private TournamentBeatmapPanel panel;
|
||||
|
||||
private float panelWidth => expanded ? 0.6f : 1;
|
||||
|
||||
private const float main_width = 0.97f;
|
||||
|
||||
private bool expanded;
|
||||
|
||||
public bool Expanded
|
||||
{
|
||||
get => expanded;
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
expanded = value;
|
||||
panel.ResizeWidthTo(panelWidth, 800, Easing.OutQuint);
|
||||
|
||||
if (expanded)
|
||||
{
|
||||
innerPanel.ResizeWidthTo(0.7f, 800, Easing.OutQuint);
|
||||
outerPanel.ResizeWidthTo(main_width, 800, Easing.OutQuint);
|
||||
@ -63,7 +72,7 @@ namespace osu.Game.Tournament.Components
|
||||
else
|
||||
{
|
||||
innerPanel.ResizeWidthTo(1, 800, Easing.OutQuint);
|
||||
outerPanel.ResizeWidthTo(0.3f, 800, Easing.OutQuint);
|
||||
outerPanel.ResizeWidthTo(0.2f, 800, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -91,7 +100,7 @@ namespace osu.Game.Tournament.Components
|
||||
RelativePositionAxes = Axes.X,
|
||||
X = -(1 - main_width) / 2,
|
||||
Y = -10,
|
||||
Width = 0.95f,
|
||||
Width = main_width,
|
||||
Height = TournamentBeatmapPanel.HEIGHT,
|
||||
CornerRadius = TournamentBeatmapPanel.HEIGHT / 2,
|
||||
Children = new Drawable[]
|
||||
@ -101,6 +110,15 @@ namespace osu.Game.Tournament.Components
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = OsuColour.Gray(0.93f),
|
||||
},
|
||||
new OsuLogo
|
||||
{
|
||||
Triangles = false,
|
||||
Colour = OsuColour.Gray(0.33f),
|
||||
Scale = new Vector2(0.08f),
|
||||
Margin = new MarginPadding(50),
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
},
|
||||
innerPanel = new Container
|
||||
{
|
||||
Masking = true,
|
||||
@ -121,15 +139,6 @@ namespace osu.Game.Tournament.Components
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}
|
||||
}
|
||||
},
|
||||
new OsuLogo
|
||||
{
|
||||
Triangles = false,
|
||||
Colour = OsuColour.Gray(0.33f),
|
||||
Scale = new Vector2(0.08f),
|
||||
Margin = new MarginPadding(50),
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -193,10 +202,12 @@ namespace osu.Game.Tournament.Components
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight
|
||||
},
|
||||
new TournamentBeatmapPanel(beatmap)
|
||||
panel = new TournamentBeatmapPanel(beatmap)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Size = new Vector2(panelWidth, 1)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Tournament.Components
|
||||
currentMatch.BindValueChanged(matchChanged);
|
||||
currentMatch.BindTo(ladder.CurrentMatch);
|
||||
|
||||
CornerRadius = 25;
|
||||
CornerRadius = HEIGHT / 2;
|
||||
Masking = true;
|
||||
|
||||
AddRangeInternal(new Drawable[]
|
||||
|
@ -91,6 +91,12 @@ namespace osu.Game.Tournament.Screens.Gameplay
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Text = "Toggle warmup",
|
||||
Action = () => warmup.Toggle()
|
||||
},
|
||||
new TriangleButton
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Text = "Toggle chat",
|
||||
Action = () => { State.Value = State.Value == TourneyState.Idle ? TourneyState.Playing : TourneyState.Idle; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user