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