From 53076f644669c7267151e86af4f58ca7b5155d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sun, 16 Oct 2016 19:25:08 +0200 Subject: [PATCH] Modify osu! logo to use new CircularContainer. --- osu-framework | 2 +- osu.Game/GameModes/Menu/OsuLogo.cs | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/osu-framework b/osu-framework index 5dc6a02088..06b67af0bc 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 5dc6a02088d0fac39810fc2da26ac0de72551939 +Subproject commit 06b67af0bc866d8d02ef4c1a0dad8d8970bd4e23 diff --git a/osu.Game/GameModes/Menu/OsuLogo.cs b/osu.Game/GameModes/Menu/OsuLogo.cs index 5e98c078a6..6e85fe34f9 100644 --- a/osu.Game/GameModes/Menu/OsuLogo.cs +++ b/osu.Game/GameModes/Menu/OsuLogo.cs @@ -17,7 +17,8 @@ namespace osu.Game.GameModes.Menu /// public partial class OsuLogo : AutoSizeContainer { - private SpriteCircular logo; + private Sprite logo; + private CircularContainer logoContainer; private Container logoBounceContainer; private MenuVisualisation vis; @@ -29,6 +30,11 @@ namespace osu.Game.GameModes.Menu private Container rippleContainer; + public override bool Contains(Vector2 screenSpacePos) + { + return logoContainer.Contains(screenSpacePos); + } + public bool Ripple { get { return rippleContainer.Alpha > 0; } @@ -38,11 +44,6 @@ namespace osu.Game.GameModes.Menu } } - public override bool Contains(Vector2 screenSpacePos) - { - return logo.Contains(screenSpacePos); - } - public bool Interactive = true; public OsuLogo() @@ -56,10 +57,17 @@ namespace osu.Game.GameModes.Menu { Children = new Drawable[] { - logo = new SpriteCircular() + logoContainer = new CircularContainer { Anchor = Anchor.Centre, - Origin = Anchor.Centre + Children = new[] + { + logo = new Sprite + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + }, + }, }, rippleContainer = new Container {