mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 23:47:21 +08:00
Rename class and fix padding considerations
This commit is contained in:
parent
5ce55e9cb4
commit
9c707ed341
@ -8,15 +8,21 @@ using osu.Framework.Input.Events;
|
|||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Screens.Play.HUD;
|
using osu.Game.Screens.Play.HUD;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||||
{
|
{
|
||||||
public partial class MultiSpectatorSettings : ExpandingContainer
|
public partial class ExpandingPlayerSettingsOverlay : ExpandingContainer
|
||||||
{
|
{
|
||||||
public const float CONTRACTED_WIDTH = 30;
|
private const float padding = 10;
|
||||||
public const int EXPANDED_WIDTH = 300;
|
|
||||||
|
|
||||||
public MultiSpectatorSettings()
|
public const float CONTRACTED_WIDTH = button_size + padding * 2;
|
||||||
|
public const float EXPANDED_WIDTH = player_settings_width + button_size + padding * 3;
|
||||||
|
|
||||||
|
private const float player_settings_width = 270;
|
||||||
|
private const float button_size = IconButton.DEFAULT_BUTTON_SIZE;
|
||||||
|
|
||||||
|
public ExpandingPlayerSettingsOverlay()
|
||||||
: base(CONTRACTED_WIDTH, EXPANDED_WIDTH)
|
: base(CONTRACTED_WIDTH, EXPANDED_WIDTH)
|
||||||
{
|
{
|
||||||
Origin = Anchor.TopRight;
|
Origin = Anchor.TopRight;
|
||||||
@ -30,6 +36,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
Anchor = Anchor.TopLeft,
|
Anchor = Anchor.TopLeft,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Margin = new MarginPadding(padding),
|
||||||
|
Spacing = new Vector2(padding),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new IconButton
|
new IconButton
|
@ -127,7 +127,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
{
|
{
|
||||||
ReadyToStart = performInitialSeek,
|
ReadyToStart = performInitialSeek,
|
||||||
},
|
},
|
||||||
new MultiSpectatorSettings()
|
new ExpandingPlayerSettingsOverlay()
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; i < Users.Count; i++)
|
for (int i = 0; i < Users.Count; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user