From e720bed9e5bf755787bc985c1d6d20f45682fc6f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 11:19:17 +0900 Subject: [PATCH 01/12] Add custom representation of unrenderable unicode characters. --- osu.Game/Graphics/Sprites/OsuSpriteText.cs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/osu.Game/Graphics/Sprites/OsuSpriteText.cs b/osu.Game/Graphics/Sprites/OsuSpriteText.cs index 02c71f46ca..ffe9e827a4 100644 --- a/osu.Game/Graphics/Sprites/OsuSpriteText.cs +++ b/osu.Game/Graphics/Sprites/OsuSpriteText.cs @@ -1,7 +1,11 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; +using osu.Framework.MathUtils; +using OpenTK; +using OpenTK.Graphics; namespace osu.Game.Graphics.Sprites { @@ -14,5 +18,26 @@ public OsuSpriteText() Shadow = true; TextSize = FONT_SIZE; } + + protected override Drawable GetUndrawableCharacter() + { + var tex = GetTextureForCharacter('?'); + + if (tex != null) + { + float adjust = (RNG.NextSingle() - 0.5f) * 2; + return new Sprite + { + Texture = tex, + Origin = Anchor.Centre, + Anchor = Anchor.Centre, + Scale = new Vector2(1 + adjust * 0.2f), + Rotation = adjust * 15, + Colour = Color4.White, + }; + } + + return base.GetUndrawableCharacter(); + } } } From 5a89ba10404ca14bf81240302a1899cdf58442c7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 11:19:58 +0900 Subject: [PATCH 02/12] Make OsuTextBox use OsuSpriteText. --- osu.Game/Graphics/UserInterface/OsuTextBox.cs | 7 ++++++- osu.Game/Screens/Select/SearchTextBox.cs | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuTextBox.cs b/osu.Game/Graphics/UserInterface/OsuTextBox.cs index ae1b1f7a18..0590c0e79b 100644 --- a/osu.Game/Graphics/UserInterface/OsuTextBox.cs +++ b/osu.Game/Graphics/UserInterface/OsuTextBox.cs @@ -8,6 +8,7 @@ using osu.Game.Graphics.Sprites; using osu.Game.Overlays; using OpenTK.Graphics; +using osu.Framework.Graphics.Sprites; namespace osu.Game.Graphics.UserInterface { @@ -17,10 +18,12 @@ public class OsuTextBox : TextBox protected override Color4 BackgroundFocused => OsuColour.Gray(0.3f).Opacity(0.8f); protected override Color4 BackgroundCommit => BorderColour; + protected override float LeftRightPadding => 10; + public OsuTextBox() { Height = 40; - TextContainer.Height = OsuSpriteText.FONT_SIZE / Height; + TextContainer.Height = 0.5f; CornerRadius = 5; } @@ -43,6 +46,8 @@ protected override void OnFocusLost(InputState state) base.OnFocusLost(state); } + + protected override SpriteText GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString() }; } public class OsuPasswordTextBox : OsuTextBox diff --git a/osu.Game/Screens/Select/SearchTextBox.cs b/osu.Game/Screens/Select/SearchTextBox.cs index 39f9fd0f80..b8ba491f8f 100644 --- a/osu.Game/Screens/Select/SearchTextBox.cs +++ b/osu.Game/Screens/Select/SearchTextBox.cs @@ -12,10 +12,11 @@ using osu.Framework.Graphics.UserInterface; using osu.Framework.Input; using osu.Game.Graphics; +using osu.Game.Graphics.UserInterface; namespace osu.Game.Screens.Select { - public class SearchTextBox : TextBox + public class SearchTextBox : OsuTextBox { protected override Color4 BackgroundUnfocused => new Color4(10, 10, 10, 255); protected override Color4 BackgroundFocused => new Color4(10, 10, 10, 255); @@ -54,7 +55,6 @@ protected override string InternalText public SearchTextBox() { Height = 35; - TextContainer.Padding = new MarginPadding(5); Add(new Drawable[] { placeholder = new SpriteText @@ -82,6 +82,13 @@ protected override void Update() base.Update(); } + protected override bool OnFocus(InputState state) + { + var result = base.OnFocus(state); + BorderThickness = 0; + return result; + } + protected override void OnFocusLost(InputState state) { if (state.Keyboard.Keys.Any(key => key == Key.Escape)) From 84096b146e45614c2cd988db5f6f439a22de64d5 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 12:41:23 +0900 Subject: [PATCH 03/12] Make password mask characters look better. --- .../UserInterface/OsuPasswordTextBox.cs | 37 +++++++++++++++++++ osu.Game/Graphics/UserInterface/OsuTextBox.cs | 10 +---- osu.Game/osu.Game.csproj | 1 + 3 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs diff --git a/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs b/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs new file mode 100644 index 0000000000..8299cdf548 --- /dev/null +++ b/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs @@ -0,0 +1,37 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Sprites; +using OpenTK; +using OpenTK.Graphics; + +namespace osu.Game.Graphics.UserInterface +{ + public class OsuPasswordTextBox : OsuTextBox + { + protected override Drawable GetDrawableCharacter(char c) => + new Container + { + Size = new Vector2(CalculatedTextSize / 2, CalculatedTextSize), + Children = new[] + { + new CircularContainer + { + Anchor = Anchor.Centre, + RelativeSizeAxes = Axes.Both, + Size = new Vector2(0.8f), + Children = new[] + { + new Box + { + Colour = Color4.White, + RelativeSizeAxes = Axes.Both, + } + }, + } + } + }; + } +} \ No newline at end of file diff --git a/osu.Game/Graphics/UserInterface/OsuTextBox.cs b/osu.Game/Graphics/UserInterface/OsuTextBox.cs index 0590c0e79b..cb78656bea 100644 --- a/osu.Game/Graphics/UserInterface/OsuTextBox.cs +++ b/osu.Game/Graphics/UserInterface/OsuTextBox.cs @@ -8,7 +8,6 @@ using osu.Game.Graphics.Sprites; using osu.Game.Overlays; using OpenTK.Graphics; -using osu.Framework.Graphics.Sprites; namespace osu.Game.Graphics.UserInterface { @@ -47,13 +46,6 @@ protected override void OnFocusLost(InputState state) base.OnFocusLost(state); } - protected override SpriteText GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString() }; - } - - public class OsuPasswordTextBox : OsuTextBox - { - protected virtual char MaskCharacter => '*'; - - protected override Drawable AddCharacterToFlow(char c) => base.AddCharacterToFlow(MaskCharacter); + protected override Drawable GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString(), TextSize = CalculatedTextSize }; } } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 5f7c171cfe..1b1c851128 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -69,6 +69,7 @@ + From a6f02106a46d8a5e7cd503baecd1c2d9e7c12efe Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 14:01:17 +0900 Subject: [PATCH 04/12] Use new placeholder logic. --- osu.Game/Graphics/UserInterface/OsuTextBox.cs | 9 ++++++ osu.Game/Overlays/Options/OptionTextBox.cs | 18 ++++++------ .../Options/Sections/General/LoginOptions.cs | 4 ++- osu.Game/Screens/Select/SearchTextBox.cs | 29 ++----------------- 4 files changed, 23 insertions(+), 37 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuTextBox.cs b/osu.Game/Graphics/UserInterface/OsuTextBox.cs index cb78656bea..0e551380ed 100644 --- a/osu.Game/Graphics/UserInterface/OsuTextBox.cs +++ b/osu.Game/Graphics/UserInterface/OsuTextBox.cs @@ -3,6 +3,8 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; +using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.UserInterface; using osu.Framework.Input; using osu.Game.Graphics.Sprites; @@ -19,6 +21,13 @@ public class OsuTextBox : TextBox protected override float LeftRightPadding => 10; + protected override SpriteText CreatePlaceholder() => new OsuSpriteText + { + Font = @"Exo2.0-MediumItalic", + Colour = new Color4(180, 180, 180, 255), + Margin = new MarginPadding { Left = 2 }, + }; + public OsuTextBox() { Height = 40; diff --git a/osu.Game/Overlays/Options/OptionTextBox.cs b/osu.Game/Overlays/Options/OptionTextBox.cs index 74730481ab..18fcfa6fca 100644 --- a/osu.Game/Overlays/Options/OptionTextBox.cs +++ b/osu.Game/Overlays/Options/OptionTextBox.cs @@ -26,16 +26,16 @@ public Bindable Bindable } } } - - protected override string InternalText + + public OptionTextBox() { - get { return base.InternalText; } - set - { - base.InternalText = value; - if (bindable != null) - bindable.Value = value; - } + OnChange += onChange; + } + + private void onChange(TextBox sender, bool newText) + { + if (bindable != null) + bindable.Value = Text; } private void bindableValueChanged(object sender, EventArgs e) diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index 398cb969e3..916159fc88 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -19,7 +19,7 @@ public class LoginOptions : OptionsSubsection, IOnlineComponent { private bool bounding = true; - protected override string Header => "Sign In"; + protected override string Header => "Account"; public override RectangleF BoundingBox => bounding ? base.BoundingBox : RectangleF.Empty; @@ -112,11 +112,13 @@ private void load(APIAccess api, OsuConfigManager config) { username = new OsuTextBox { + PlaceholderText = "Username", RelativeSizeAxes = Axes.X, Text = api?.Username ?? string.Empty }, password = new OsuPasswordTextBox { + PlaceholderText = "Password", RelativeSizeAxes = Axes.X }, saveUsername = new OsuCheckbox diff --git a/osu.Game/Screens/Select/SearchTextBox.cs b/osu.Game/Screens/Select/SearchTextBox.cs index b8ba491f8f..a96209d0d8 100644 --- a/osu.Game/Screens/Select/SearchTextBox.cs +++ b/osu.Game/Screens/Select/SearchTextBox.cs @@ -34,38 +34,11 @@ public bool HoldFocus } } - private SpriteText placeholder; - - protected override string InternalText - { - get { return base.InternalText; } - set - { - base.InternalText = value; - if (placeholder != null) - { - if (string.IsNullOrEmpty(value)) - placeholder.Text = "type to search"; - else - placeholder.Text = string.Empty; - } - } - } - public SearchTextBox() { Height = 35; Add(new Drawable[] { - placeholder = new SpriteText - { - Font = @"Exo2.0-MediumItalic", - Text = "type to search", - Colour = new Color4(180, 180, 180, 255), - Anchor = Anchor.CentreLeft, - Origin = Anchor.CentreLeft, - Margin = new MarginPadding { Left = 10 }, - }, new TextAwesome { Icon = FontAwesome.fa_search, @@ -74,6 +47,8 @@ public SearchTextBox() Margin = new MarginPadding { Right = 10 }, } }); + + PlaceholderText = "type to search"; } protected override void Update() From 5eb3ef394831a0d4fc7014df34565cb9d66c7c25 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 15:13:32 +0900 Subject: [PATCH 05/12] Make LoginOverlay and OptionsOverlay focused containers. --- osu.Game/Overlays/LoginOverlay.cs | 4 +++- osu.Game/Overlays/OptionsOverlay.cs | 22 +++------------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/osu.Game/Overlays/LoginOverlay.cs b/osu.Game/Overlays/LoginOverlay.cs index ff7a63969e..4ffa63d7cb 100644 --- a/osu.Game/Overlays/LoginOverlay.cs +++ b/osu.Game/Overlays/LoginOverlay.cs @@ -14,7 +14,7 @@ namespace osu.Game.Overlays { - class LoginOverlay : OverlayContainer + class LoginOverlay : FocusedOverlayContainer { private LoginOptions optionsSection; @@ -64,6 +64,8 @@ private void load(OsuColour colours) protected override void PopIn() { + base.PopIn(); + optionsSection.Bounding = true; FadeIn(transition_time, EasingTypes.OutQuint); } diff --git a/osu.Game/Overlays/OptionsOverlay.cs b/osu.Game/Overlays/OptionsOverlay.cs index 28f67357c2..0b481ee068 100644 --- a/osu.Game/Overlays/OptionsOverlay.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -23,7 +23,7 @@ namespace osu.Game.Overlays { - public class OptionsOverlay : OverlayContainer + public class OptionsOverlay : FocusedOverlayContainer { internal const float CONTENT_MARGINS = 10; @@ -159,26 +159,10 @@ protected override void Update() } } - protected override bool OnHover(InputState state) => true; - - protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; - - protected override bool OnClick(InputState state) => true; - - protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) - { - switch (args.Key) - { - case Key.Escape: - if (State == Visibility.Hidden) return false; - Hide(); - return true; - } - return base.OnKeyDown(state, args); - } - protected override void PopIn() { + base.PopIn(); + scrollContainer.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint); sidebar.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint); FadeTo(1, TRANSITION_LENGTH / 2); From bbf8d1000b6eab41eb9f7fb3076b2b8ed5e4f949 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 15:13:56 +0900 Subject: [PATCH 06/12] Update focus requesting code in SearchTextBox. --- osu.Game/Screens/Select/SearchTextBox.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/osu.Game/Screens/Select/SearchTextBox.cs b/osu.Game/Screens/Select/SearchTextBox.cs index a96209d0d8..a583def51c 100644 --- a/osu.Game/Screens/Select/SearchTextBox.cs +++ b/osu.Game/Screens/Select/SearchTextBox.cs @@ -16,6 +16,9 @@ namespace osu.Game.Screens.Select { + /// + /// A textbox which holds focus eagerly. + /// public class SearchTextBox : OsuTextBox { protected override Color4 BackgroundUnfocused => new Color4(10, 10, 10, 255); @@ -34,6 +37,8 @@ public bool HoldFocus } } + public override bool RequestingFocus => HoldFocus; + public SearchTextBox() { Height = 35; @@ -51,12 +56,6 @@ public SearchTextBox() PlaceholderText = "type to search"; } - protected override void Update() - { - if (HoldFocus) RequestFocus(); - base.Update(); - } - protected override bool OnFocus(InputState state) { var result = base.OnFocus(state); From 937c065af7ae7ba33974ed4733fc2bfc420a950c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 15:14:15 +0900 Subject: [PATCH 07/12] Clear content of SearchTextBox on first escape keypress. --- osu.Game/Screens/Select/SearchTextBox.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Select/SearchTextBox.cs b/osu.Game/Screens/Select/SearchTextBox.cs index a583def51c..f1870cca29 100644 --- a/osu.Game/Screens/Select/SearchTextBox.cs +++ b/osu.Game/Screens/Select/SearchTextBox.cs @@ -3,13 +3,10 @@ using System; using System.Linq; -using OpenTK; using OpenTK.Graphics; using OpenTK.Input; using osu.Framework.Graphics; using osu.Framework.Graphics.Primitives; -using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.UserInterface; using osu.Framework.Input; using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; @@ -66,7 +63,12 @@ protected override bool OnFocus(InputState state) protected override void OnFocusLost(InputState state) { if (state.Keyboard.Keys.Any(key => key == Key.Escape)) - Exit?.Invoke(); + { + if (Text.Length > 0) + Text = string.Empty; + else + Exit?.Invoke(); + } base.OnFocusLost(state); } From 417b0817a93efd4c57e180b0e7090a606a1c5f46 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 15:30:20 +0900 Subject: [PATCH 08/12] Improve arrow key redirection at song select. --- osu.Game/Screens/Select/SearchTextBox.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Select/SearchTextBox.cs b/osu.Game/Screens/Select/SearchTextBox.cs index f1870cca29..d6385d463a 100644 --- a/osu.Game/Screens/Select/SearchTextBox.cs +++ b/osu.Game/Screens/Select/SearchTextBox.cs @@ -74,8 +74,19 @@ protected override void OnFocusLost(InputState state) protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) { - if (args.Key == Key.Left || args.Key == Key.Right || args.Key == Key.Enter) - return false; + if (!state.Keyboard.ControlPressed && !state.Keyboard.ShiftPressed) + { + switch (args.Key) + { + case Key.Left: + case Key.Right: + case Key.Up: + case Key.Down: + case Key.Enter: + return false; + } + } + return base.OnKeyDown(state, args); } } From 06695dbf9b9b958736ca0e582b8150ef334918d0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 16:01:48 +0900 Subject: [PATCH 09/12] Method name update. --- osu.Game/Graphics/Sprites/OsuSpriteText.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/Sprites/OsuSpriteText.cs b/osu.Game/Graphics/Sprites/OsuSpriteText.cs index ffe9e827a4..5bc76b74b4 100644 --- a/osu.Game/Graphics/Sprites/OsuSpriteText.cs +++ b/osu.Game/Graphics/Sprites/OsuSpriteText.cs @@ -19,7 +19,7 @@ public OsuSpriteText() TextSize = FONT_SIZE; } - protected override Drawable GetUndrawableCharacter() + protected override Drawable CreateFallbackCharacterDrawable() { var tex = GetTextureForCharacter('?'); @@ -37,7 +37,7 @@ protected override Drawable GetUndrawableCharacter() }; } - return base.GetUndrawableCharacter(); + return base.CreateFallbackCharacterDrawable(); } } } From 55e717757726708c3e95ae80fe698250b5f6408b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 16:01:58 +0900 Subject: [PATCH 10/12] Password masking character animation. --- .../UserInterface/OsuPasswordTextBox.cs | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs b/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs index 8299cdf548..13fbbb16e0 100644 --- a/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs +++ b/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs @@ -1,9 +1,10 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Transformations; using OpenTK; using OpenTK.Graphics; @@ -11,17 +12,23 @@ namespace osu.Game.Graphics.UserInterface { public class OsuPasswordTextBox : OsuTextBox { - protected override Drawable GetDrawableCharacter(char c) => - new Container + protected override Drawable GetDrawableCharacter(char c) => new PasswordMaskChar(CalculatedTextSize); + + public class PasswordMaskChar : Container + { + private CircularContainer circle; + + public PasswordMaskChar(float size) { - Size = new Vector2(CalculatedTextSize / 2, CalculatedTextSize), + Size = new Vector2(size / 2, size); Children = new[] { - new CircularContainer + circle = new CircularContainer { Anchor = Anchor.Centre, + Alpha = 0, RelativeSizeAxes = Axes.Both, - Size = new Vector2(0.8f), + Size = new Vector2(0.8f, 0), Children = new[] { new Box @@ -31,7 +38,15 @@ protected override Drawable GetDrawableCharacter(char c) => } }, } - } - }; + }; + } + + protected override void LoadComplete() + { + base.LoadComplete(); + circle.FadeIn(500, EasingTypes.OutQuint); + circle.ResizeTo(new Vector2(0.8f), 500, EasingTypes.OutQuint); + } + } } -} \ No newline at end of file +} From fcc8072262e4ae43608132f41e2be6c9be64fa28 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 17:00:30 +0900 Subject: [PATCH 11/12] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 93cd883930..e7796f6060 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 93cd883930e362f7bb8c361ac7f36b5387d4fac3 +Subproject commit e7796f6060ebaa870bab797521201813f72cc699 From 92c77263ede60a6ae2b7dbdb0b65b7fad173ef34 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 17:12:37 +0900 Subject: [PATCH 12/12] Use CircularContainer for nub (bumps framework). --- osu-framework | 2 +- osu.Game/Graphics/UserInterface/Nub.cs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/osu-framework b/osu-framework index e7796f6060..3811650c08 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit e7796f6060ebaa870bab797521201813f72cc699 +Subproject commit 3811650c08bc47282a373d870e4d2203b38d275d diff --git a/osu.Game/Graphics/UserInterface/Nub.cs b/osu.Game/Graphics/UserInterface/Nub.cs index 4ce25095b9..c8174ef546 100644 --- a/osu.Game/Graphics/UserInterface/Nub.cs +++ b/osu.Game/Graphics/UserInterface/Nub.cs @@ -13,7 +13,7 @@ namespace osu.Game.Graphics.UserInterface { - class Nub : Container, IStateful + class Nub : CircularContainer, IStateful { public const float COLLAPSED_SIZE = 20; public const float EXPANDED_SIZE = 40; @@ -27,10 +27,6 @@ public Nub() { Size = new Vector2(COLLAPSED_SIZE, 12); - Masking = true; - - CornerRadius = Height / 2; - Masking = true; BorderColour = Color4.White; BorderThickness = border_width;