mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 18:47:27 +08:00
Merge remote-tracking branch 'ppy/master' into hud-mod-display
This commit is contained in:
commit
df4a737c9b
40
.vscode/launch.json
vendored
40
.vscode/launch.json
vendored
@ -2,46 +2,60 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Launch VisualTests",
|
"name": "VisualTests (debug)",
|
||||||
"windows": {
|
"windows": {
|
||||||
"type": "clr"
|
"type": "clr"
|
||||||
},
|
},
|
||||||
"type": "mono",
|
"type": "mono",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceRoot}/osu.Desktop.VisualTests/bin/Debug/osu!.exe",
|
"program": "${workspaceRoot}/osu.Desktop.VisualTests/bin/Debug/osu!.exe",
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "Build (Debug)",
|
||||||
"runtimeExecutable": null,
|
"runtimeExecutable": null,
|
||||||
"env": {},
|
"env": {},
|
||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Launch Desktop",
|
"name": "VisualTests (release)",
|
||||||
|
"windows": {
|
||||||
|
"type": "clr"
|
||||||
|
},
|
||||||
|
"type": "mono",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceRoot}/osu.Desktop.VisualTests/bin/Release/osu!.exe",
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"preLaunchTask": "Build (Release)",
|
||||||
|
"runtimeExecutable": null,
|
||||||
|
"env": {},
|
||||||
|
"console": "internalConsole"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "osu! (debug)",
|
||||||
"windows": {
|
"windows": {
|
||||||
"type": "clr"
|
"type": "clr"
|
||||||
},
|
},
|
||||||
"type": "mono",
|
"type": "mono",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceRoot}/osu.Desktop/bin/Debug/osu!.exe",
|
"program": "${workspaceRoot}/osu.Desktop/bin/Debug/osu!.exe",
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "Build (Debug)",
|
||||||
"runtimeExecutable": null,
|
"runtimeExecutable": null,
|
||||||
"env": {},
|
"env": {},
|
||||||
"console": "internalConsole"
|
"console": "internalConsole"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Attach",
|
"name": "osu! (release)",
|
||||||
"windows": {
|
"windows": {
|
||||||
"type": "clr",
|
"type": "clr"
|
||||||
"request": "attach",
|
|
||||||
"processName": "osu!"
|
|
||||||
},
|
},
|
||||||
"type": "mono",
|
"type": "mono",
|
||||||
"request": "attach",
|
"request": "launch",
|
||||||
"address": "localhost",
|
"program": "${workspaceRoot}/osu.Desktop/bin/Release/osu!.exe",
|
||||||
"port": 55555
|
"cwd": "${workspaceRoot}",
|
||||||
|
"preLaunchTask": "Build (Release)",
|
||||||
|
"runtimeExecutable": null,
|
||||||
|
"env": {},
|
||||||
|
"console": "internalConsole"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
77
.vscode/tasks.json
vendored
77
.vscode/tasks.json
vendored
@ -1,51 +1,50 @@
|
|||||||
{
|
{
|
||||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
// for the documentation about the tasks.json format
|
// for the documentation about the tasks.json format
|
||||||
"version": "0.1.0",
|
"version": "2.0.0",
|
||||||
"taskSelector": "/t:",
|
"problemMatcher": "$msCompile",
|
||||||
|
"isShellCommand": true,
|
||||||
|
"command": "msbuild",
|
||||||
|
"suppressTaskName": true,
|
||||||
|
"showOutput": "silent",
|
||||||
|
"args": [
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/property:DebugType=portable"
|
||||||
|
],
|
||||||
|
"windows": {
|
||||||
|
"args": [
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/property:DebugType=portable",
|
||||||
|
"/m" //parallel compiling support. doesn't work well with mono atm
|
||||||
|
]
|
||||||
|
},
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"taskName": "build",
|
"taskName": "Build (Debug)",
|
||||||
"isShellCommand": true,
|
|
||||||
"showOutput": "silent",
|
|
||||||
"command": "msbuild",
|
|
||||||
"args": [
|
|
||||||
"/property:GenerateFullPaths=true",
|
|
||||||
"/property:DebugType=portable"
|
|
||||||
],
|
|
||||||
"windows": {
|
|
||||||
"args": [
|
|
||||||
"/property:GenerateFullPaths=true",
|
|
||||||
"/property:DebugType=portable",
|
|
||||||
"/m" //parallel compiling support. doesn't work well with mono atm
|
|
||||||
]
|
|
||||||
},
|
|
||||||
// Use the standard MS compiler pattern to detect errors, warnings and infos
|
|
||||||
"problemMatcher": "$msCompile",
|
|
||||||
"isBuildCommand": true
|
"isBuildCommand": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"taskName": "rebuild",
|
"taskName": "Build (Release)",
|
||||||
"isShellCommand": true,
|
|
||||||
"showOutput": "silent",
|
|
||||||
"command": "msbuild",
|
|
||||||
"args": [
|
"args": [
|
||||||
// Ask msbuild to generate full paths for file names.
|
"/property:Configuration=Release"
|
||||||
"/property:GenerateFullPaths=true",
|
]
|
||||||
"/property:DebugType=portable",
|
},
|
||||||
"/target:Clean,Build"
|
{
|
||||||
],
|
"taskName": "Clean All",
|
||||||
"windows": {
|
"dependsOn": ["Clean (Debug)", "Clean (Release)"]
|
||||||
"args": [
|
},
|
||||||
"/property:GenerateFullPaths=true",
|
{
|
||||||
"/property:DebugType=portable",
|
"taskName": "Clean (Debug)",
|
||||||
"/target:Clean,Build",
|
"args": [
|
||||||
"/m" //parallel compiling support. doesn't work well with mono atm
|
"/target:Clean"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// Use the standard MS compiler pattern to detect errors, warnings and infos
|
{
|
||||||
"problemMatcher": "$msCompile",
|
"taskName": "Clean (Release)",
|
||||||
"isBuildCommand": true
|
"args": [
|
||||||
|
"/target:Clean",
|
||||||
|
"/property:Configuration=Release"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
21
osu.Game/Overlays/Options/OptionCheckbox.cs
Normal file
21
osu.Game/Overlays/Options/OptionCheckbox.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Options
|
||||||
|
{
|
||||||
|
public class OptionCheckbox : OptionItem<bool>
|
||||||
|
{
|
||||||
|
private OsuCheckbox checkbox;
|
||||||
|
|
||||||
|
protected override Drawable CreateControl() => checkbox = new OsuCheckbox();
|
||||||
|
|
||||||
|
public override string LabelText
|
||||||
|
{
|
||||||
|
get { return checkbox.LabelText; }
|
||||||
|
set { checkbox.LabelText = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,45 +2,18 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Configuration;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options
|
namespace osu.Game.Overlays.Options
|
||||||
{
|
{
|
||||||
public class OptionDropdown<T> : FillFlowContainer
|
public class OptionDropdown<T> : OptionItem<T>
|
||||||
{
|
{
|
||||||
private readonly Dropdown<T> dropdown;
|
private Dropdown<T> dropdown;
|
||||||
private readonly SpriteText text;
|
|
||||||
|
|
||||||
public string LabelText
|
private IEnumerable<KeyValuePair<string, T>> items = new KeyValuePair<string, T>[] { };
|
||||||
{
|
|
||||||
get { return text.Text; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
text.Text = value;
|
|
||||||
text.Alpha = !string.IsNullOrEmpty(value) ? 1 : 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Bindable<T> Bindable
|
|
||||||
{
|
|
||||||
get { return bindable; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
bindable = value;
|
|
||||||
dropdown.Current.BindTo(bindable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Bindable<T> bindable;
|
|
||||||
|
|
||||||
private IEnumerable<KeyValuePair<string, T>> items;
|
|
||||||
public IEnumerable<KeyValuePair<string, T>> Items
|
public IEnumerable<KeyValuePair<string, T>> Items
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -55,30 +28,11 @@ namespace osu.Game.Overlays.Options
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionDropdown()
|
protected override Drawable CreateControl() => dropdown = new OsuDropdown<T>
|
||||||
{
|
{
|
||||||
Items = new KeyValuePair<string, T>[0];
|
Margin = new MarginPadding { Top = 5 },
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
Direction = FillDirection.Vertical;
|
Items = Items,
|
||||||
RelativeSizeAxes = Axes.X;
|
};
|
||||||
AutoSizeAxes = Axes.Y;
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
text = new OsuSpriteText {
|
|
||||||
Alpha = 0,
|
|
||||||
},
|
|
||||||
dropdown = new OsuDropdown<T>
|
|
||||||
{
|
|
||||||
Margin = new MarginPadding { Top = 5 },
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Items = Items,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dropdown.Current.DisabledChanged += disabled =>
|
|
||||||
{
|
|
||||||
Alpha = disabled ? 0.3f : 1;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
82
osu.Game/Overlays/Options/OptionItem.cs
Normal file
82
osu.Game/Overlays/Options/OptionItem.cs
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Primitives;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Options
|
||||||
|
{
|
||||||
|
public abstract class OptionItem<T> : FillFlowContainer, IFilterable
|
||||||
|
{
|
||||||
|
protected abstract Drawable CreateControl();
|
||||||
|
|
||||||
|
protected Drawable Control { get; }
|
||||||
|
|
||||||
|
private IHasCurrentValue<T> controlWithCurrent => Control as IHasCurrentValue<T>;
|
||||||
|
|
||||||
|
private SpriteText text;
|
||||||
|
|
||||||
|
public virtual string LabelText
|
||||||
|
{
|
||||||
|
get { return text?.Text ?? string.Empty; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (text == null)
|
||||||
|
{
|
||||||
|
// construct lazily for cases where the label is not needed (may be provided by the Control).
|
||||||
|
Add(text = new OsuSpriteText() { Depth = 1 });
|
||||||
|
}
|
||||||
|
|
||||||
|
text.Text = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// hold a reference to the provided bindable so we don't have to in every options section.
|
||||||
|
private Bindable<T> bindable;
|
||||||
|
|
||||||
|
public Bindable<T> Bindable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return bindable;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
bindable = value;
|
||||||
|
controlWithCurrent?.Current.BindTo(bindable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string[] FilterTerms => new[] { LabelText };
|
||||||
|
|
||||||
|
public bool MatchingCurrentFilter
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
// probably needs a better transition.
|
||||||
|
FadeTo(value ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected OptionItem()
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X;
|
||||||
|
AutoSizeAxes = Axes.Y;
|
||||||
|
Padding = new MarginPadding { Right = 5 };
|
||||||
|
|
||||||
|
if ((Control = CreateControl()) != null)
|
||||||
|
{
|
||||||
|
if (controlWithCurrent != null)
|
||||||
|
controlWithCurrent.Current.DisabledChanged += disabled => { Colour = disabled ? Color4.Gray : Color4.White; };
|
||||||
|
Add(Control);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,13 +2,15 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options
|
namespace osu.Game.Overlays.Options
|
||||||
{
|
{
|
||||||
internal class OptionLabel : OsuSpriteText
|
internal class OptionLabel : OptionItem<string>
|
||||||
{
|
{
|
||||||
|
protected override Drawable CreateControl() => null;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colour)
|
private void load(OsuColour colour)
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Configuration;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options
|
namespace osu.Game.Overlays.Options
|
||||||
@ -17,52 +13,14 @@ namespace osu.Game.Overlays.Options
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OptionSlider<T, U> : FillFlowContainer
|
public class OptionSlider<T, U> : OptionItem<T>
|
||||||
where T : struct
|
where T : struct
|
||||||
where U : SliderBar<T>, new()
|
where U : SliderBar<T>, new()
|
||||||
{
|
{
|
||||||
private readonly SliderBar<T> slider;
|
protected override Drawable CreateControl() => new U()
|
||||||
private readonly SpriteText text;
|
|
||||||
|
|
||||||
public string LabelText
|
|
||||||
{
|
{
|
||||||
get { return text.Text; }
|
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
||||||
set
|
RelativeSizeAxes = Axes.X
|
||||||
{
|
};
|
||||||
text.Text = value;
|
|
||||||
text.Alpha = string.IsNullOrEmpty(value) ? 0 : 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Bindable<T> bindable;
|
|
||||||
|
|
||||||
public Bindable<T> Bindable
|
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
bindable = value;
|
|
||||||
slider.Current.BindTo(bindable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public OptionSlider()
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X;
|
|
||||||
AutoSizeAxes = Axes.Y;
|
|
||||||
Padding = new MarginPadding { Right = 5 };
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
text = new OsuSpriteText
|
|
||||||
{
|
|
||||||
Alpha = 0,
|
|
||||||
},
|
|
||||||
slider = new U()
|
|
||||||
{
|
|
||||||
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
|
||||||
RelativeSizeAxes = Axes.X
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,13 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options
|
namespace osu.Game.Overlays.Options
|
||||||
{
|
{
|
||||||
public class OptionTextBox : OsuTextBox
|
public class OptionTextBox : OptionItem<string>
|
||||||
{
|
{
|
||||||
private Bindable<string> bindable;
|
protected override Drawable CreateControl() => new OsuTextBox();
|
||||||
|
|
||||||
public Bindable<string> Bindable
|
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
bindable = value;
|
|
||||||
Current.BindTo(bindable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Audio
|
namespace osu.Game.Overlays.Options.Sections.Audio
|
||||||
{
|
{
|
||||||
@ -16,12 +15,12 @@ namespace osu.Game.Overlays.Options.Sections.Audio
|
|||||||
{
|
{
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Interface voices",
|
LabelText = "Interface voices",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuVoice)
|
Bindable = config.GetBindable<bool>(OsuConfig.MenuVoice)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "osu! music theme",
|
LabelText = "osu! music theme",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuMusic)
|
Bindable = config.GetBindable<bool>(OsuConfig.MenuMusic)
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Debug
|
namespace osu.Game.Overlays.Options.Sections.Debug
|
||||||
{
|
{
|
||||||
@ -17,7 +16,7 @@ namespace osu.Game.Overlays.Options.Sections.Debug
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Bypass caching",
|
LabelText = "Bypass caching",
|
||||||
Bindable = config.GetBindable<bool>(FrameworkDebugConfig.BypassCaching)
|
Bindable = config.GetBindable<bool>(FrameworkDebugConfig.BypassCaching)
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Gameplay
|
namespace osu.Game.Overlays.Options.Sections.Gameplay
|
||||||
{
|
{
|
||||||
@ -22,12 +21,12 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay
|
|||||||
LabelText = "Background dim",
|
LabelText = "Background dim",
|
||||||
Bindable = config.GetBindable<double>(OsuConfig.DimLevel)
|
Bindable = config.GetBindable<double>(OsuConfig.DimLevel)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Show score overlay",
|
LabelText = "Show score overlay",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.ShowInterface)
|
Bindable = config.GetBindable<bool>(OsuConfig.ShowInterface)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Always show key overlay",
|
LabelText = "Always show key overlay",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.KeyOverlay)
|
Bindable = config.GetBindable<bool>(OsuConfig.KeyOverlay)
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.General
|
namespace osu.Game.Overlays.Options.Sections.General
|
||||||
{
|
{
|
||||||
@ -17,7 +16,7 @@ namespace osu.Game.Overlays.Options.Sections.General
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Prefer metadata in original language",
|
LabelText = "Prefer metadata in original language",
|
||||||
Bindable = frameworkConfig.GetBindable<bool>(FrameworkConfig.ShowUnicode)
|
Bindable = frameworkConfig.GetBindable<bool>(FrameworkConfig.ShowUnicode)
|
||||||
|
@ -132,12 +132,12 @@ namespace osu.Game.Overlays.Options.Sections.General
|
|||||||
TabbableContentContainer = this,
|
TabbableContentContainer = this,
|
||||||
OnCommit = (sender, newText) => performLogin()
|
OnCommit = (sender, newText) => performLogin()
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Remember username",
|
LabelText = "Remember username",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.SaveUsername),
|
Bindable = config.GetBindable<bool>(OsuConfig.SaveUsername),
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Stay logged in",
|
LabelText = "Stay logged in",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.SavePassword),
|
Bindable = config.GetBindable<bool>(OsuConfig.SavePassword),
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Graphics
|
namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||||
{
|
{
|
||||||
@ -17,12 +16,12 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Snaking in sliders",
|
LabelText = "Snaking in sliders",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.SnakingInSliders)
|
Bindable = config.GetBindable<bool>(OsuConfig.SnakingInSliders)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Snaking out sliders",
|
LabelText = "Snaking out sliders",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.SnakingOutSliders)
|
Bindable = config.GetBindable<bool>(OsuConfig.SnakingOutSliders)
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Graphics
|
namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||||
{
|
{
|
||||||
@ -29,7 +28,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
|||||||
LabelText = "Screen mode",
|
LabelText = "Screen mode",
|
||||||
Bindable = config.GetBindable<WindowMode>(FrameworkConfig.WindowMode),
|
Bindable = config.GetBindable<WindowMode>(FrameworkConfig.WindowMode),
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Letterboxing",
|
LabelText = "Letterboxing",
|
||||||
Bindable = letterboxing,
|
Bindable = letterboxing,
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Graphics
|
namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||||
{
|
{
|
||||||
@ -16,7 +15,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
|||||||
{
|
{
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Parallax",
|
LabelText = "Parallax",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuParallax)
|
Bindable = config.GetBindable<bool>(OsuConfig.MenuParallax)
|
||||||
|
@ -5,7 +5,6 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Graphics
|
namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||||
{
|
{
|
||||||
@ -25,7 +24,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
|||||||
LabelText = "Frame limiter",
|
LabelText = "Frame limiter",
|
||||||
Bindable = config.GetBindable<FrameSync>(FrameworkConfig.FrameSync)
|
Bindable = config.GetBindable<FrameSync>(FrameworkConfig.FrameSync)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Show FPS",
|
LabelText = "Show FPS",
|
||||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.ShowFpsDisplay)
|
Bindable = osuConfig.GetBindable<bool>(OsuConfig.ShowFpsDisplay)
|
||||||
|
@ -24,12 +24,12 @@ namespace osu.Game.Overlays.Options.Sections.Input
|
|||||||
LabelText = "Confine mouse cursor",
|
LabelText = "Confine mouse cursor",
|
||||||
Bindable = config.GetBindable<ConfineMouseMode>(FrameworkConfig.ConfineMouseMode),
|
Bindable = config.GetBindable<ConfineMouseMode>(FrameworkConfig.ConfineMouseMode),
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Disable mouse wheel during gameplay",
|
LabelText = "Disable mouse wheel during gameplay",
|
||||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.MouseDisableWheel)
|
Bindable = osuConfig.GetBindable<bool>(OsuConfig.MouseDisableWheel)
|
||||||
},
|
},
|
||||||
new OsuCheckbox
|
new OptionCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Disable mouse buttons during gameplay",
|
LabelText = "Disable mouse buttons during gameplay",
|
||||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.MouseDisableButtons)
|
Bindable = osuConfig.GetBindable<bool>(OsuConfig.MouseDisableButtons)
|
||||||
|
@ -69,6 +69,13 @@ namespace osu.Game.Screens.Select
|
|||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnSuspending(Screen next)
|
||||||
|
{
|
||||||
|
modSelect.Hide();
|
||||||
|
|
||||||
|
base.OnSuspending(next);
|
||||||
|
}
|
||||||
|
|
||||||
protected override bool OnExiting(Screen next)
|
protected override bool OnExiting(Screen next)
|
||||||
{
|
{
|
||||||
if (modSelect.State == Visibility.Visible)
|
if (modSelect.State == Visibility.Visible)
|
||||||
|
@ -372,8 +372,10 @@
|
|||||||
<Compile Include="Overlays\Options\Sections\SkinSection.cs" />
|
<Compile Include="Overlays\Options\Sections\SkinSection.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\OsuCheckbox.cs" />
|
<Compile Include="Graphics\UserInterface\OsuCheckbox.cs" />
|
||||||
<Compile Include="Overlays\Options\SidebarButton.cs" />
|
<Compile Include="Overlays\Options\SidebarButton.cs" />
|
||||||
|
<Compile Include="Overlays\Options\OptionCheckbox.cs" />
|
||||||
<Compile Include="Overlays\Options\OptionTextBox.cs" />
|
<Compile Include="Overlays\Options\OptionTextBox.cs" />
|
||||||
<Compile Include="Overlays\Options\OptionSlider.cs" />
|
<Compile Include="Overlays\Options\OptionSlider.cs" />
|
||||||
|
<Compile Include="Overlays\Options\OptionItem.cs" />
|
||||||
<Compile Include="Overlays\Options\OptionEnumDropdown.cs" />
|
<Compile Include="Overlays\Options\OptionEnumDropdown.cs" />
|
||||||
<Compile Include="Configuration\RankingType.cs" />
|
<Compile Include="Configuration\RankingType.cs" />
|
||||||
<Compile Include="Configuration\ScoreMeterType.cs" />
|
<Compile Include="Configuration\ScoreMeterType.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user