Change create room button colouring to match design

This commit is contained in:
Dean Herbert 2020-02-20 18:28:20 +09:00
parent a94a6eb94e
commit 76c57a695b

View File

@ -19,7 +19,6 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Input;
using osu.Game.Online.API;
using osu.Game.Online.Multiplayer;
using osu.Game.Overlays.BeatmapSet.Buttons;
using osu.Game.Screens.Menu;
using osu.Game.Screens.Multi.Components;
using osu.Game.Screens.Multi.Lounge;
@ -129,22 +128,11 @@ namespace osu.Game.Screens.Multi
}
},
new Header(screenStack),
createButton = new HeaderButton
createButton = new CreateRoomButton
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
RelativeSizeAxes = Axes.None,
Size = new Vector2(150, Header.HEIGHT - 20),
Margin = new MarginPadding
{
Top = 10,
Right = 10 + HORIZONTAL_OVERFLOW_PADDING,
},
Text = "Create room",
Action = () => loungeSubScreen.Open(new Room
{
Name = { Value = $"{api.LocalUser}'s awesome room" }
}),
Action = createRoom
},
roomManager = new RoomManager()
}
@ -276,6 +264,11 @@ namespace osu.Game.Screens.Multi
logo.Delay(WaveContainer.DISAPPEAR_DURATION / 2).FadeOut();
}
private void createRoom()
{
loungeSubScreen.Open(new Room { Name = { Value = $"{api.LocalUser}'s awesome room" } });
}
private void beginHandlingTrack()
{
Beatmap.BindValueChanged(updateTrack, true);
@ -381,5 +374,29 @@ namespace osu.Game.Screens.Multi
protected override double TransformDuration => 200;
}
}
public class CreateRoomButton : TriangleButton
{
public CreateRoomButton()
{
Size = new Vector2(150, Header.HEIGHT - 20);
Margin = new MarginPadding
{
Top = 10,
Right = 10 + HORIZONTAL_OVERFLOW_PADDING,
};
}
[BackgroundDependencyLoader]
private void load()
{
BackgroundColour = OsuColour.FromHex(@"593790");
Triangles.ColourLight = OsuColour.FromHex(@"7247b6");
Triangles.ColourDark = OsuColour.FromHex(@"593790");
Triangles.TriangleScale = 1.5f;
Text = "Create room";
}
}
}
}