From 537f0b93407882e6417c4c801e0f9de1602e921e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 23 Mar 2017 08:07:59 +0900 Subject: [PATCH] Fix menu cursor size not sticking on startup. Also tidied up bindables. --- osu.Game/Graphics/Cursor/GameplayCursor.cs | 5 ++--- osu.Game/Graphics/Cursor/MenuCursor.cs | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Graphics/Cursor/GameplayCursor.cs b/osu.Game/Graphics/Cursor/GameplayCursor.cs index 42d7e83750..ed9d52d0b7 100644 --- a/osu.Game/Graphics/Cursor/GameplayCursor.cs +++ b/osu.Game/Graphics/Cursor/GameplayCursor.cs @@ -54,8 +54,6 @@ namespace osu.Game.Graphics.Cursor [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - cursorScale = config.GetBindable(OsuConfig.GameplayCursorSize); - Children = new Drawable[] { cursorContainer = new CircularContainer @@ -63,7 +61,6 @@ namespace osu.Game.Graphics.Cursor Origin = Anchor.Centre, Anchor = Anchor.Centre, RelativeSizeAxes = Axes.Both, - Scale = new Vector2((float)cursorScale), Masking = true, BorderThickness = Size.X / 6, BorderColour = Color4.White, @@ -119,7 +116,9 @@ namespace osu.Game.Graphics.Cursor }, }; + cursorScale = config.GetBindable(OsuConfig.GameplayCursorSize); cursorScale.ValueChanged += scaleChanged; + cursorScale.TriggerChange(); } private void scaleChanged(object sender, EventArgs e) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 0f90a5aa0e..3ab6fa7093 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -97,8 +97,6 @@ namespace osu.Game.Graphics.Cursor [BackgroundDependencyLoader] private void load(OsuConfigManager config, TextureStore textures, OsuColour colour) { - cursorScale = config.GetBindable(OsuConfig.MenuCursorSize); - Children = new Drawable[] { cursorContainer = new Container @@ -122,7 +120,10 @@ namespace osu.Game.Graphics.Cursor } } }; + + cursorScale = config.GetBindable(OsuConfig.MenuCursorSize); cursorScale.ValueChanged += scaleChanged; + cursorScale.TriggerChange(); } private void scaleChanged(object sender, EventArgs e)