From 3c999d64d451db3ab3163cc6100790f967a9a11c Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 6 Mar 2019 16:09:21 +0900 Subject: [PATCH] Fix post-merge errors --- .../Profile/Header/CenterHeaderContainer.cs | 20 +++++++++---------- .../Profile/Header/ProfileHeaderTabControl.cs | 16 +++++++-------- osu.Game/Overlays/Profile/ProfileHeader.cs | 10 ++++------ 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/osu.Game/Overlays/Profile/Header/CenterHeaderContainer.cs b/osu.Game/Overlays/Profile/Header/CenterHeaderContainer.cs index 30671487d3..fc330a03a9 100644 --- a/osu.Game/Overlays/Profile/Header/CenterHeaderContainer.cs +++ b/osu.Game/Overlays/Profile/Header/CenterHeaderContainer.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using osu.Framework.Allocation; -using osu.Framework.Configuration; +using osu.Framework.Bindables; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -108,8 +108,7 @@ namespace osu.Game.Overlays.Profile.Header { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, - TextSize = 16, - Font = "Exo2.0-Bold" + Font = OsuFont.GetFont(weight: FontWeight.Bold) } } } @@ -182,10 +181,9 @@ namespace osu.Game.Overlays.Profile.Header }, levelBadgeText = new OsuSpriteText { - TextSize = 20, - Font = "Exo2.0-Medium", Anchor = Anchor.Centre, Origin = Anchor.Centre, + Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium) } } }, @@ -215,8 +213,7 @@ namespace osu.Game.Overlays.Profile.Header { Anchor = Anchor.BottomRight, Origin = Anchor.TopRight, - Font = "Exo2.0-Bold", - TextSize = 12, + Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold) } } }, @@ -248,9 +245,12 @@ namespace osu.Game.Overlays.Profile.Header } }; - DetailsVisible.ValueChanged += newValue => expandButtonIcon.Icon = newValue ? FontAwesome.fa_chevron_down : FontAwesome.fa_chevron_up; - DetailsVisible.ValueChanged += newValue => hiddenDetailContainer.Alpha = newValue ? 1 : 0; - DetailsVisible.ValueChanged += newValue => expandedDetailContainer.Alpha = newValue ? 0 : 1; + DetailsVisible.ValueChanged += visible => + { + expandButtonIcon.Icon = visible.NewValue ? FontAwesome.fa_chevron_down : FontAwesome.fa_chevron_up; + hiddenDetailContainer.Alpha = visible.NewValue ? 1 : 0; + expandedDetailContainer.Alpha = visible.NewValue ? 0 : 1; + }; } private void updateDisplay() diff --git a/osu.Game/Overlays/Profile/Header/ProfileHeaderTabControl.cs b/osu.Game/Overlays/Profile/Header/ProfileHeaderTabControl.cs index fd7124f20f..a8e50e00fe 100644 --- a/osu.Game/Overlays/Profile/Header/ProfileHeaderTabControl.cs +++ b/osu.Game/Overlays/Profile/Header/ProfileHeaderTabControl.cs @@ -5,6 +5,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.UserInterface; using osu.Framework.Input.Events; +using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osuTK; @@ -36,7 +37,7 @@ namespace osu.Game.Overlays.Profile.Header } } - public MarginPadding Padding + public new MarginPadding Padding { get => TabContainer.Padding; set => TabContainer.Padding = value; @@ -78,7 +79,7 @@ namespace osu.Game.Overlays.Profile.Header accentColour = value; bar.Colour = value; - if (!Active) text.Colour = value; + if (!Active.Value) text.Colour = value; } } @@ -96,8 +97,7 @@ namespace osu.Game.Overlays.Profile.Header Origin = Anchor.BottomLeft, Anchor = Anchor.BottomLeft, Text = value, - TextSize = 14, - Font = "Exo2.0-Bold", + Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold) }, bar = new Circle { @@ -112,7 +112,7 @@ namespace osu.Game.Overlays.Profile.Header protected override bool OnHover(HoverEvent e) { - if (!Active) + if (!Active.Value) onActivated(true); return base.OnHover(e); } @@ -121,7 +121,7 @@ namespace osu.Game.Overlays.Profile.Header { base.OnHoverLost(e); - if (!Active) + if (!Active.Value) OnDeactivated(); } @@ -134,7 +134,7 @@ namespace osu.Game.Overlays.Profile.Header { text.FadeColour(AccentColour, 120, Easing.InQuad); bar.ResizeHeightTo(0, 120, Easing.InQuad); - text.Font = "Exo2.0-Medium"; + text.Font = text.Font.With(Typeface.Exo, weight: FontWeight.Medium); } private void onActivated(bool fake = false) @@ -142,7 +142,7 @@ namespace osu.Game.Overlays.Profile.Header text.FadeColour(Color4.White, 120, Easing.InQuad); bar.ResizeHeightTo(7.5f, 120, Easing.InQuad); if (!fake) - text.Font = "Exo2.0-Bold"; + text.Font = text.Font.With(Typeface.Exo, weight: FontWeight.Bold); } } } diff --git a/osu.Game/Overlays/Profile/ProfileHeader.cs b/osu.Game/Overlays/Profile/ProfileHeader.cs index 21f1989606..fdb515270b 100644 --- a/osu.Game/Overlays/Profile/ProfileHeader.cs +++ b/osu.Game/Overlays/Profile/ProfileHeader.cs @@ -2,7 +2,6 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; -using osu.Framework.Configuration; using osuTK.Graphics; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; @@ -15,6 +14,7 @@ using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Overlays.Profile.Header; using osu.Game.Users; +using osu.Framework.Bindables; namespace osu.Game.Overlays.Profile { @@ -145,7 +145,7 @@ namespace osu.Game.Overlays.Profile infoTabControl.AddItem("Modding"); centerHeaderContainer.DetailsVisible.BindTo(DetailsVisible); - DetailsVisible.ValueChanged += newValue => detailHeaderContainer.Alpha = newValue ? 0 : 1; + DetailsVisible.ValueChanged += visible => detailHeaderContainer.Alpha = visible.NewValue ? 0 : 1; } [BackgroundDependencyLoader] @@ -224,13 +224,11 @@ namespace osu.Game.Overlays.Profile }, title = new OsuSpriteText { - Font = "Exo2.0-Bold", - TextSize = big ? 14 : 12, + Font = OsuFont.GetFont(size: big ? 14 : 12, weight: FontWeight.Bold) }, content = new OsuSpriteText { - Font = "Exo2.0-Light", - TextSize = big ? 40 : 18, + Font = OsuFont.GetFont(size: big ? 40 : 18, weight: FontWeight.Light) }, new Container //Add a minimum size to the FillFlowContainer {