Merge remote-tracking branch 'upstream/master' into screen-title-class

This commit is contained in:
Dean Herbert
2019-03-29 14:01:08 +09:00
352 changed files with 2579 additions and 2602 deletions

View File

@ -11,7 +11,7 @@ namespace osu.Game.Graphics.UserInterface
public BackButton()
{
Text = @"back";
Icon = FontAwesome.fa_osu_left_o;
Icon = OsuIcon.LeftCircle;
Anchor = Anchor.BottomLeft;
Origin = Anchor.BottomLeft;
}

View File

@ -8,6 +8,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface;
using System.Linq;
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Graphics.UserInterface
{
@ -92,7 +93,7 @@ namespace osu.Game.Graphics.UserInterface
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreLeft,
Size = new Vector2(item_chevron_size),
Icon = FontAwesome.fa_chevron_right,
Icon = FontAwesome.ChevronRight,
Margin = new MarginPadding { Left = padding },
Alpha = 0f,
});

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Framework.Platform;
using osuTK;
@ -25,7 +26,7 @@ namespace osu.Game.Graphics.UserInterface
Size = new Vector2(12);
InternalChild = new SpriteIcon
{
Icon = FontAwesome.fa_external_link,
Icon = FontAwesome.ExternalLink,
RelativeSizeAxes = Axes.Both
};
}

View File

@ -16,9 +16,6 @@ namespace osu.Game.Graphics.UserInterface
/// </summary>
public class FocusedTextBox : OsuTextBox
{
protected override Color4 BackgroundUnfocused => new Color4(10, 10, 10, 255);
protected override Color4 BackgroundFocused => new Color4(10, 10, 10, 255);
public Action Exit;
private bool focus;
@ -47,6 +44,9 @@ namespace osu.Game.Graphics.UserInterface
private void load(GameHost host)
{
this.host = host;
BackgroundUnfocused = new Color4(10, 10, 10, 255);
BackgroundFocused = new Color4(10, 10, 10, 255);
}
// We may not be focused yet, but we need to handle keyboard input to be able to request focus

View File

@ -4,6 +4,7 @@
using osuTK;
using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
namespace osu.Game.Graphics.UserInterface
@ -41,7 +42,7 @@ namespace osu.Game.Graphics.UserInterface
/// <summary>
/// The icon.
/// </summary>
public FontAwesome Icon
public IconUsage Icon
{
get => icon.Icon;
set => icon.Icon = value;

View File

@ -3,6 +3,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osuTK;
using osuTK.Graphics;
@ -36,14 +37,14 @@ namespace osu.Game.Graphics.UserInterface
Position = new Vector2(1, 1),
Colour = Color4.Black,
Alpha = 0.4f,
Icon = FontAwesome.fa_circle_o_notch
Icon = FontAwesome.CircleONotch
},
spinner = new SpriteIcon
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.fa_circle_o_notch
Icon = FontAwesome.CircleONotch
}
};
}

View File

@ -179,7 +179,7 @@ namespace osu.Game.Graphics.UserInterface
Chevron = new SpriteIcon
{
AlwaysPresent = true,
Icon = FontAwesome.fa_chevron_right,
Icon = FontAwesome.ChevronRight,
Colour = Color4.Black,
Alpha = 0.5f,
Size = new Vector2(8),
@ -244,7 +244,7 @@ namespace osu.Game.Graphics.UserInterface
},
Icon = new SpriteIcon
{
Icon = FontAwesome.fa_chevron_down,
Icon = FontAwesome.ChevronDown,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Margin = new MarginPadding { Right = 4 },

View File

@ -9,6 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input;
using osu.Framework.Input.Events;
using osu.Framework.Platform;
@ -107,7 +108,7 @@ namespace osu.Game.Graphics.UserInterface
public CapsWarning()
{
Icon = FontAwesome.fa_warning;
Icon = FontAwesome.Warning;
}
[BackgroundDependencyLoader]

View File

@ -254,7 +254,7 @@ namespace osu.Game.Graphics.UserInterface
{
new SpriteIcon
{
Icon = FontAwesome.fa_ellipsis_h,
Icon = FontAwesome.EllipsisH,
Size = new Vector2(14),
Origin = Anchor.Centre,
Anchor = Anchor.Centre,

View File

@ -99,7 +99,7 @@ namespace osu.Game.Graphics.UserInterface
icon = new SpriteIcon
{
Size = new Vector2(14),
Icon = FontAwesome.fa_circle_o,
Icon = FontAwesome.CircleOutline,
Shadow = true,
},
},
@ -120,12 +120,12 @@ namespace osu.Game.Graphics.UserInterface
if (selected.NewValue)
{
fadeIn();
icon.Icon = FontAwesome.fa_check_circle_o;
icon.Icon = FontAwesome.CheckCircleOutline;
}
else
{
fadeOut();
icon.Icon = FontAwesome.fa_circle_o;
icon.Icon = FontAwesome.CircleOutline;
}
};
}

View File

@ -16,10 +16,6 @@ namespace osu.Game.Graphics.UserInterface
{
public class OsuTextBox : TextBox, IKeyBindingHandler<GlobalAction>
{
protected override Color4 BackgroundUnfocused => Color4.Black.Opacity(0.5f);
protected override Color4 BackgroundFocused => OsuColour.Gray(0.3f).Opacity(0.8f);
protected override Color4 BackgroundCommit => BorderColour;
protected override float LeftRightPadding => 10;
protected override SpriteText CreatePlaceholder() => new OsuSpriteText
@ -41,7 +37,9 @@ namespace osu.Game.Graphics.UserInterface
[BackgroundDependencyLoader]
private void load(OsuColour colour)
{
BorderColour = colour.Yellow;
BackgroundUnfocused = Color4.Black.Opacity(0.5f);
BackgroundFocused = OsuColour.Gray(0.3f).Opacity(0.8f);
BackgroundCommit = BorderColour = colour.Yellow;
}
protected override void OnFocus(FocusEvent e)

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osuTK;
using osuTK.Input;
@ -21,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface
{
new SpriteIcon
{
Icon = FontAwesome.fa_search,
Icon = FontAwesome.Search,
Origin = Anchor.CentreRight,
Anchor = Anchor.CentreRight,
Margin = new MarginPadding { Right = 10 },

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.MathUtils;
using System;
using System.Linq;
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Graphics.UserInterface
{
@ -142,7 +143,7 @@ namespace osu.Game.Graphics.UserInterface
Child = Icon = new SpriteIcon
{
Size = new Vector2(star_size),
Icon = FontAwesome.fa_star,
Icon = FontAwesome.Star,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
};

View File

@ -33,5 +33,7 @@ namespace osu.Game.Graphics.UserInterface
{
set => this.FadeTo(value ? 1 : 0);
}
public bool FilteringActive { get; set; }
}
}

View File

@ -149,7 +149,7 @@ namespace osu.Game.Graphics.UserInterface
};
}
public FontAwesome Icon
public IconUsage Icon
{
set => bouncingIcon.Icon = value;
}
@ -207,7 +207,7 @@ namespace osu.Game.Graphics.UserInterface
private readonly SpriteIcon icon;
public FontAwesome Icon
public IconUsage Icon
{
set => icon.Icon = value;
}