mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Merge pull request #2504 from UselessToucan/player_loader_input_toggles
Add input toggles to the PlayerLoader screen
This commit is contained in:
commit
78ca111d69
@ -7,15 +7,15 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Screens.Menu;
|
||||
using osu.Game.Screens.Play.PlayerSettings;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -51,11 +51,19 @@ namespace osu.Game.Screens.Play
|
||||
Origin = Anchor.Centre,
|
||||
});
|
||||
|
||||
Add(new VisualSettings
|
||||
Add(new FillFlowContainer<PlayerSettingsGroup>
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Margin = new MarginPadding(25)
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 20),
|
||||
Margin = new MarginPadding(25),
|
||||
Children = new PlayerSettingsGroup[]
|
||||
{
|
||||
new VisualSettings(),
|
||||
new InputSettings()
|
||||
}
|
||||
});
|
||||
|
||||
loadTask = LoadComponentAsync(player);
|
||||
|
30
osu.Game/Screens/Play/PlayerSettings/InputSettings.cs
Normal file
30
osu.Game/Screens/Play/PlayerSettings/InputSettings.cs
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Screens.Play.PlayerSettings
|
||||
{
|
||||
public class InputSettings : PlayerSettingsGroup
|
||||
{
|
||||
protected override string Title => "Input settings";
|
||||
|
||||
private readonly PlayerCheckbox mouseButtonsCheckbox;
|
||||
|
||||
public InputSettings()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
mouseButtonsCheckbox = new PlayerCheckbox
|
||||
{
|
||||
LabelText = "Disable mouse buttons"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config) => mouseButtonsCheckbox.Bindable = config.GetBindable<bool>(OsuSetting.MouseDisableButtons);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user