mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:07:52 +08:00
Use new icon in chat overlay
This commit is contained in:
parent
0dceef8cd7
commit
83d23c9547
@ -23,6 +23,7 @@ using osu.Game.Overlays.Chat.Selection;
|
||||
using osu.Game.Overlays.Chat.Tabs;
|
||||
using osuTK.Input;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
@ -78,7 +79,7 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config, OsuColour colours)
|
||||
private void load(OsuConfigManager config, OsuColour colours, TextureStore textures)
|
||||
{
|
||||
const float padding = 5;
|
||||
|
||||
@ -163,13 +164,13 @@ namespace osu.Game.Overlays
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.Black,
|
||||
},
|
||||
new SpriteIcon
|
||||
new Sprite
|
||||
{
|
||||
Icon = FontAwesome.Solid.Comments,
|
||||
Texture = textures.Get(IconTexture),
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Size = new Vector2(20),
|
||||
Margin = new MarginPadding(10),
|
||||
Size = new Vector2(OverlayTitle.ICON_SIZE),
|
||||
Margin = new MarginPadding { Left = 10 },
|
||||
},
|
||||
ChannelTabControl = CreateChannelTabControl().With(d =>
|
||||
{
|
||||
|
@ -14,6 +14,8 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
public abstract class OverlayTitle : CompositeDrawable, INamedOverlayComponent
|
||||
{
|
||||
public const float ICON_SIZE = 30;
|
||||
|
||||
private readonly OsuSpriteText titleText;
|
||||
private readonly Container icon;
|
||||
|
||||
@ -51,7 +53,7 @@ namespace osu.Game.Overlays
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Margin = new MarginPadding { Horizontal = 5 }, // compensates for osu-web sprites having around 5px of whitespace on each side
|
||||
Size = new Vector2(30)
|
||||
Size = new Vector2(ICON_SIZE)
|
||||
},
|
||||
titleText = new OsuSpriteText
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user