From 61d5c7c56dec678a7d8190737eee5f3205435804 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 12 Oct 2016 16:11:40 +0900 Subject: [PATCH] Make stuff compile again (but StarCounter hits assertions). --- osu.Game/Graphics/UserInterface/AlternativeComboCounter.cs | 6 ++++-- osu.Game/Graphics/UserInterface/NumericRollingCounter.cs | 6 ++++-- osu.Game/Graphics/UserInterface/RollingCounter.cs | 7 ++++--- osu.Game/Graphics/UserInterface/ScoreCounter.cs | 6 ++++-- osu.Game/Graphics/UserInterface/StandardComboCounter.cs | 6 ++++-- osu.Game/Graphics/UserInterface/StarCounter.cs | 7 +++++-- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/AlternativeComboCounter.cs b/osu.Game/Graphics/UserInterface/AlternativeComboCounter.cs index 8c5510eca4..9b710174ea 100644 --- a/osu.Game/Graphics/UserInterface/AlternativeComboCounter.cs +++ b/osu.Game/Graphics/UserInterface/AlternativeComboCounter.cs @@ -3,6 +3,7 @@ using OpenTK; using OpenTK.Graphics; +using osu.Framework; using osu.Framework.Graphics.Transformations; using System; using System.Collections.Generic; @@ -29,9 +30,10 @@ public AlternativeComboCounter() : base() IsRollingContinuous = false; } - public override void Load() + public override void Load(BaseGame game) { - base.Load(); + base.Load(game); + countSpriteText.Hide(); OriginalColour = Colour; } diff --git a/osu.Game/Graphics/UserInterface/NumericRollingCounter.cs b/osu.Game/Graphics/UserInterface/NumericRollingCounter.cs index ce0efb6450..e1cb9ddbb4 100644 --- a/osu.Game/Graphics/UserInterface/NumericRollingCounter.cs +++ b/osu.Game/Graphics/UserInterface/NumericRollingCounter.cs @@ -1,6 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using System; @@ -31,9 +32,10 @@ public float TextSize } } - public override void Load() + public override void Load(BaseGame game) { - base.Load(); + base.Load(game); + Children = new Drawable[] { countSpriteText = new SpriteText diff --git a/osu.Game/Graphics/UserInterface/RollingCounter.cs b/osu.Game/Graphics/UserInterface/RollingCounter.cs index b0f757a378..b0686ca0cb 100644 --- a/osu.Game/Graphics/UserInterface/RollingCounter.cs +++ b/osu.Game/Graphics/UserInterface/RollingCounter.cs @@ -1,4 +1,5 @@ -using osu.Framework.Graphics; +using osu.Framework; +using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Transformations; using System; @@ -109,9 +110,9 @@ protected RollingCounter() ); } - public override void Load() + public override void Load(BaseGame game) { - base.Load(); + base.Load(game); removeTransforms(transformType); if (Count == null) ResetCount(); diff --git a/osu.Game/Graphics/UserInterface/ScoreCounter.cs b/osu.Game/Graphics/UserInterface/ScoreCounter.cs index cdf22eaea1..d5b9edf73d 100644 --- a/osu.Game/Graphics/UserInterface/ScoreCounter.cs +++ b/osu.Game/Graphics/UserInterface/ScoreCounter.cs @@ -1,6 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework; using System; using System.Collections.Generic; using System.Linq; @@ -16,9 +17,10 @@ public class ScoreCounter : ULongCounter /// public uint LeadingZeroes = 0; - public override void Load() + public override void Load(BaseGame game) { - base.Load(); + base.Load(game); + countSpriteText.FixedWidth = true; } diff --git a/osu.Game/Graphics/UserInterface/StandardComboCounter.cs b/osu.Game/Graphics/UserInterface/StandardComboCounter.cs index b3af78b78e..676e3672d2 100644 --- a/osu.Game/Graphics/UserInterface/StandardComboCounter.cs +++ b/osu.Game/Graphics/UserInterface/StandardComboCounter.cs @@ -1,6 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using System; @@ -30,9 +31,10 @@ public StandardComboCounter() : base() IsRollingContinuous = false; } - public override void Load() + public override void Load(BaseGame game) { - base.Load(); + base.Load(game); + countSpriteText.Alpha = 0; Add(popOutSpriteText = new SpriteText { diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index 3ee67a38d6..790e0ddcc8 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -2,6 +2,7 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK; +using osu.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Transformations; @@ -52,9 +53,9 @@ public override void ResetCount() StopRolling(); } - public override void Load() + public override void Load(BaseGame game) { - base.Load(); + base.Load(game); Children = new Drawable[] { @@ -79,6 +80,8 @@ public override void Load() Alpha = (i == 0) ? 1.0f : MinStarAlpha, Position = new Vector2((StarSize + StarSpacing) * i + (StarSize + StarSpacing) / 2, 0), }; + + //todo: user Container once we have it. stars.Add(star); starContainer.Add(star); }