diff --git a/osu-framework b/osu-framework index 6e7fa7ebe5..6357711a41 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 6e7fa7ebe564e9bca957ea26ff2bee6038c2bf67 +Subproject commit 6357711a41aaaeecfb8a60c09c5d5cc3c01d1778 diff --git a/osu.Game/GameModes/Menu/ButtonSystem.cs b/osu.Game/GameModes/Menu/ButtonSystem.cs index 32bbff5480..24ccba839a 100644 --- a/osu.Game/GameModes/Menu/ButtonSystem.cs +++ b/osu.Game/GameModes/Menu/ButtonSystem.cs @@ -181,6 +181,8 @@ namespace osu.Game.GameModes.Menu MenuState state; + public override bool HandleInput => state != MenuState.Exit; + public MenuState State { get @@ -239,8 +241,6 @@ namespace osu.Game.GameModes.Menu b.State = Button.ButtonState.Expanded; break; case MenuState.Exit: - HandleInput = false; - buttonArea.FadeOut(200); foreach (Button b in buttonsTopLevel) @@ -298,14 +298,16 @@ namespace osu.Game.GameModes.Menu { Children = new Drawable[] { - logo = new Sprite(Game.Textures.Get(@"menu-osu")) + logo = new Sprite() { - Anchor = Anchor.Centre, + Texture = Game.Textures.Get(@"menu-osu"), + Anchor = Anchor.Centre, Origin = Anchor.Centre }, - ripple = new Sprite(Game.Textures.Get(@"menu-osu")) + ripple = new Sprite() { - Anchor = Anchor.Centre, + Texture = Game.Textures.Get(@"menu-osu"), + Anchor = Anchor.Centre, Origin = Anchor.Centre, Alpha = 0.4f }, @@ -587,9 +589,10 @@ namespace osu.Game.GameModes.Menu //box.FlashColour(ColourHelper.Lighten2(colour, 0.7f), 200); } + public override bool HandleInput => state != ButtonState.Exploded && box.Scale.X >= 0.8f; + protected override void Update() { - HandleInput = state != ButtonState.Exploded && box.Scale.X >= 0.8f; iconText.Alpha = MathHelper.Clamp((box.Scale.X - 0.5f) / 0.3f, 0, 1); base.Update(); } diff --git a/osu.Game/Online/API/OAuth.cs b/osu.Game/Online/API/OAuth.cs index bbd33c0b95..3358fac0e8 100644 --- a/osu.Game/Online/API/OAuth.cs +++ b/osu.Game/Online/API/OAuth.cs @@ -65,7 +65,7 @@ namespace osu.Game.Online.API Token = req.ResponseObject; return true; } - catch (Exception e) + catch { //todo: potentially only kill the refresh token on certain exception types. Token = null; diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 315150a2cd..b1aeaa0a2d 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -13,6 +13,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Textures; using osu.Framework.IO.Stores; +using osu.Framework.OS; namespace osu.Game { @@ -24,6 +25,13 @@ namespace osu.Game internal APIAccess API; + public override void SetHost(BasicGameHost host) + { + base.SetHost(host); + + host.Size = new Vector2(Config.Get(OsuConfig.Width), Config.Get(OsuConfig.Height)); + } + public override void Load() { base.Load(); @@ -31,8 +39,6 @@ namespace osu.Game //this completely overrides the framework default. will need to change once we make a proper FontStore. Fonts = new TextureStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Regular")) { ScaleAdjust = 0.01f }; - Parent.Size = new Vector2(Config.Get(OsuConfig.Width), Config.Get(OsuConfig.Height)); - API = new APIAccess() { Username = Config.Get(OsuConfig.Username), @@ -73,8 +79,8 @@ namespace osu.Game if (Parent != null) { - Parent.Width = Config.Set(OsuConfig.Width, ActualSize.X).Value; - Parent.Height = Config.Set(OsuConfig.Height, ActualSize.Y).Value; + Config.Set(OsuConfig.Width, ActualSize.X); + Config.Set(OsuConfig.Height, ActualSize.Y); } return true; }