mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +08:00
Fix chat overlay being far too large
This commit is contained in:
parent
2d0240437a
commit
3249ecee27
@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Chat.ChannelList
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Height = 30;
|
Height = 25;
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -87,7 +87,7 @@ namespace osu.Game.Overlays.Chat.ChannelList
|
|||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Text = Channel.Name,
|
Text = Channel.Name,
|
||||||
Font = OsuFont.Torus.With(size: 17, weight: FontWeight.SemiBold),
|
Font = OsuFont.Torus.With(size: 14, weight: FontWeight.SemiBold),
|
||||||
Colour = colourProvider.Light3,
|
Colour = colourProvider.Light3,
|
||||||
Margin = new MarginPadding { Bottom = 2 },
|
Margin = new MarginPadding { Bottom = 2 },
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
@ -47,7 +47,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
|
|
||||||
public IReadOnlyCollection<Drawable> DrawableContentFlow => drawableContentFlow;
|
public IReadOnlyCollection<Drawable> DrawableContentFlow => drawableContentFlow;
|
||||||
|
|
||||||
protected virtual float FontSize => 20;
|
protected virtual float FontSize => 14;
|
||||||
|
|
||||||
protected virtual float Spacing => 15;
|
protected virtual float Spacing => 15;
|
||||||
|
|
||||||
|
@ -19,6 +19,8 @@ namespace osu.Game.Overlays.Chat
|
|||||||
{
|
{
|
||||||
public partial class ChatTextBar : Container
|
public partial class ChatTextBar : Container
|
||||||
{
|
{
|
||||||
|
public const float HEIGHT = 40;
|
||||||
|
|
||||||
public readonly BindableBool ShowSearch = new BindableBool();
|
public readonly BindableBool ShowSearch = new BindableBool();
|
||||||
|
|
||||||
public event Action<string>? OnChatMessageCommitted;
|
public event Action<string>? OnChatMessageCommitted;
|
||||||
@ -45,7 +47,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
private void load(OverlayColourProvider colourProvider)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 60;
|
Height = HEIGHT;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -76,7 +78,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
Child = chattingText = new TruncatingSpriteText
|
Child = chattingText = new TruncatingSpriteText
|
||||||
{
|
{
|
||||||
MaxWidth = chatting_text_width - padding * 2,
|
MaxWidth = chatting_text_width - padding * 2,
|
||||||
Font = OsuFont.Torus.With(size: 20),
|
Font = OsuFont.Torus,
|
||||||
Colour = colourProvider.Background1,
|
Colour = colourProvider.Background1,
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
@ -91,7 +93,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
Icon = FontAwesome.Solid.Search,
|
Icon = FontAwesome.Solid.Search,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Size = new Vector2(20),
|
Size = new Vector2(OsuFont.DEFAULT_FONT_SIZE),
|
||||||
Margin = new MarginPadding { Right = 2 },
|
Margin = new MarginPadding { Right = 2 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -101,6 +103,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
Padding = new MarginPadding { Right = padding },
|
Padding = new MarginPadding { Right = padding },
|
||||||
Child = chatTextBox = new ChatTextBox
|
Child = chatTextBox = new ChatTextBox
|
||||||
{
|
{
|
||||||
|
FontSize = OsuFont.DEFAULT_FONT_SIZE,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
@ -55,7 +55,6 @@ namespace osu.Game.Overlays
|
|||||||
private const int transition_length = 500;
|
private const int transition_length = 500;
|
||||||
private const float top_bar_height = 40;
|
private const float top_bar_height = 40;
|
||||||
private const float side_bar_width = 190;
|
private const float side_bar_width = 190;
|
||||||
private const float chat_bar_height = 60;
|
|
||||||
|
|
||||||
protected override string PopInSampleName => @"UI/overlay-big-pop-in";
|
protected override string PopInSampleName => @"UI/overlay-big-pop-in";
|
||||||
protected override string PopOutSampleName => @"UI/overlay-big-pop-out";
|
protected override string PopOutSampleName => @"UI/overlay-big-pop-out";
|
||||||
@ -136,7 +135,7 @@ namespace osu.Game.Overlays
|
|||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Left = side_bar_width,
|
Left = side_bar_width,
|
||||||
Bottom = chat_bar_height,
|
Bottom = ChatTextBar.HEIGHT,
|
||||||
},
|
},
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user