Disable relative mode for TournamentGame

This commit is contained in:
Shivam 2021-03-23 23:22:17 +01:00
parent bb6e50eb27
commit d17c431faf
1 changed files with 11 additions and 5 deletions

View File

@ -2,18 +2,21 @@
// See the LICENCE file in the repository root for full licence text.
using System.Drawing;
using osu.Framework.Extensions.Color4Extensions;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Configuration;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Colour;
using osu.Game.Graphics.Cursor;
using osu.Game.Tournament.Models;
using osu.Framework.Input.Handlers.Mouse;
using osu.Framework.Platform;
using osu.Game.Graphics;
using osu.Game.Graphics.Cursor;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.Models;
using osuTK;
using osuTK.Graphics;
@ -36,7 +39,7 @@ public class TournamentGame : TournamentGameBase
private LoadingSpinner loadingSpinner;
[BackgroundDependencyLoader]
private void load(FrameworkConfigManager frameworkConfig)
private void load(FrameworkConfigManager frameworkConfig, GameHost host)
{
windowSize = frameworkConfig.GetBindable<Size>(FrameworkSetting.WindowedSize);
windowMode = frameworkConfig.GetBindable<WindowMode>(FrameworkSetting.WindowMode);
@ -48,6 +51,9 @@ private void load(FrameworkConfigManager frameworkConfig)
Margin = new MarginPadding(40),
});
var m = (MouseHandler)host.AvailableInputHandlers.Single(t => t is MouseHandler);
m.UseRelativeMode.Value = false;
loadingSpinner.Show();
BracketLoadTask.ContinueWith(_ => LoadComponentsAsync(new[]