mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:07:52 +08:00
Update to latest DI stuff
This commit is contained in:
parent
7327db307b
commit
0d4560a054
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -5,7 +5,7 @@
|
||||
"name": "Launch",
|
||||
"type": "mono",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/osu.Desktop/bin/Debug/osu!.exe",
|
||||
"program": "${workspaceRoot}/osu.Desktop.VisualTests/bin/Debug/osu!.exe",
|
||||
"args": [],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"preLaunchTask": "",
|
||||
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
}
|
@ -1 +1 @@
|
||||
Subproject commit eb16219058e87210c9ad90b1e214ccc2c1556058
|
||||
Subproject commit aa01720fe9eb6e3b30a4455298a1c6eca7fb7680
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.GameModes.Testing;
|
||||
using osu.Game.Overlays;
|
||||
@ -24,9 +25,9 @@ namespace osu.Desktop.Tests
|
||||
|
||||
protected MusicController mc;
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load()
|
||||
{
|
||||
base.Load(game);
|
||||
ourClock = new FramedClock();
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -69,10 +70,10 @@ namespace osu.Game.GameModes
|
||||
OnBeatmapChanged(beatmap.Value);
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer(permitNulls: true)]
|
||||
private void Load(OsuGameBase game)
|
||||
{
|
||||
base.Load(game);
|
||||
beatmap = (game as OsuGameBase)?.Beatmap;
|
||||
beatmap = game?.Beatmap;
|
||||
}
|
||||
|
||||
public override bool Push(GameMode mode)
|
||||
|
@ -16,16 +16,7 @@ namespace osu.Game.Graphics.Containers
|
||||
public ParallaxContainer()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
private Container content;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
[Initializer]
|
||||
private void Load()
|
||||
{
|
||||
AddInternal(content = new Container()
|
||||
AddInternal(content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
@ -33,6 +24,10 @@ namespace osu.Game.Graphics.Containers
|
||||
});
|
||||
}
|
||||
|
||||
private Container content;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
{
|
||||
content.Position = (state.Mouse.Position - DrawSize / 2) * ParallaxAmount;
|
||||
|
@ -64,6 +64,8 @@ namespace osu.Game
|
||||
if (args?.Length > 0)
|
||||
Schedule(delegate { Dependencies.Get<BeatmapDatabase>().Import(args); });
|
||||
|
||||
Dependencies.Cache(this);
|
||||
|
||||
//attach our bindables to the audio subsystem.
|
||||
Audio.Volume.Weld(Config.GetBindable<double>(OsuConfig.VolumeUniversal));
|
||||
Audio.VolumeSample.Weld(Config.GetBindable<double>(OsuConfig.VolumeEffect));
|
||||
@ -93,7 +95,7 @@ namespace osu.Game
|
||||
}
|
||||
});
|
||||
|
||||
(Options = new OptionsOverlay { Depth = float.MaxValue / 2 }).Preload(game, Add);
|
||||
(Options = new OptionsOverlay { Depth = float.MaxValue / 2 }).Preload(this, Add);
|
||||
|
||||
(intro = new Intro
|
||||
{
|
||||
|
@ -67,14 +67,14 @@ namespace osu.Game
|
||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-BlackItalic"));
|
||||
|
||||
AddInternal(ratioContainer = new RatioAdjust());
|
||||
|
||||
|
||||
var options = new OptionsOverlay();
|
||||
Children = new Drawable[]
|
||||
{
|
||||
Options = new OptionsOverlay(),
|
||||
options,
|
||||
Cursor = new OsuCursorContainer { Depth = float.MaxValue }
|
||||
};
|
||||
|
||||
Dependencies.Cache(Options);
|
||||
Dependencies.Cache(options);
|
||||
|
||||
Beatmap.ValueChanged += Beatmap_ValueChanged;
|
||||
|
||||
|
@ -7,6 +7,8 @@ using System.Threading.Tasks;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
@ -174,21 +176,16 @@ namespace osu.Game.Overlays
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer(permitNulls: true)]
|
||||
private void Load(OsuGame osuGame, BeatmapDatabase beatmaps, AudioManager audio, TextureStore textures)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
|
||||
if (osuGame != null)
|
||||
{
|
||||
if (database == null) database = osuGame.Beatmaps;
|
||||
trackManager = osuGame.Audio.Track;
|
||||
}
|
||||
if (database == null) database = beatmaps;
|
||||
trackManager = audio.Track;
|
||||
|
||||
beatmapSource = osuGame?.Beatmap ?? new Bindable<WorkingBeatmap>();
|
||||
playList = database.GetAllWithChildren<BeatmapSetInfo>();
|
||||
|
||||
backgroundSprite = getScaledSprite(fallbackTexture = game.Textures.Get(@"Backgrounds/bg4"));
|
||||
backgroundSprite = getScaledSprite(fallbackTexture = textures.Get(@"Backgrounds/bg4"));
|
||||
AddInternal(backgroundSprite);
|
||||
}
|
||||
|
||||
|
@ -1,36 +1,36 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Audio
|
||||
{
|
||||
public class VolumeOptions : OptionsSubsection
|
||||
{
|
||||
namespace osu.Game.Overlays.Options.Audio
|
||||
{
|
||||
public class VolumeOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Volume";
|
||||
|
||||
private CheckBoxOption ignoreHitsounds;
|
||||
|
||||
public VolumeOptions()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteText { Text = "Master: TODO slider" },
|
||||
new SpriteText { Text = "Music: TODO slider" },
|
||||
new SpriteText { Text = "Effect: TODO slider" },
|
||||
ignoreHitsounds = new CheckBoxOption { LabelText = "Ignore beatmap hitsounds" }
|
||||
};
|
||||
private CheckBoxOption ignoreHitsounds;
|
||||
|
||||
public VolumeOptions()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new Drawable[]
|
||||
{
|
||||
ignoreHitsounds.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSamples);
|
||||
}
|
||||
}
|
||||
}
|
||||
new SpriteText { Text = "Master: TODO slider" },
|
||||
new SpriteText { Text = "Music: TODO slider" },
|
||||
new SpriteText { Text = "Effect: TODO slider" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Ignore beatmap hitsounds",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSamples)
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,47 +1,56 @@
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Options
|
||||
{
|
||||
public class EditorSection : OptionsSection
|
||||
{
|
||||
protected override string Header => "Editor";
|
||||
namespace osu.Game.Overlays.Options
|
||||
{
|
||||
public class EditorSection : OptionsSection
|
||||
{
|
||||
protected override string Header => "Editor";
|
||||
public override FontAwesome Icon => FontAwesome.fa_pencil;
|
||||
|
||||
private CheckBoxOption backgroundVideo, defaultSkin, snakingSliders, hitAnimations, followPoints, stacking;
|
||||
|
||||
public EditorSection()
|
||||
{
|
||||
content.Spacing = new Vector2(0, 5);
|
||||
Children = new Drawable[]
|
||||
{
|
||||
backgroundVideo = new CheckBoxOption { LabelText = "Background video" },
|
||||
defaultSkin = new CheckBoxOption { LabelText = "Always use default skin" },
|
||||
snakingSliders = new CheckBoxOption { LabelText = "Snaking sliders" },
|
||||
hitAnimations = new CheckBoxOption { LabelText = "Hit animations" },
|
||||
followPoints = new CheckBoxOption { LabelText = "Follow points" },
|
||||
stacking = new CheckBoxOption { LabelText = "Stacking" },
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
content.Spacing = new Vector2(0, 5);
|
||||
Children = new Drawable[]
|
||||
{
|
||||
backgroundVideo.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.VideoEditor);
|
||||
defaultSkin.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorDefaultSkin);
|
||||
snakingSliders.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorSnakingSliders);
|
||||
hitAnimations.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorHitAnimations);
|
||||
followPoints.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorFollowPoints);
|
||||
stacking.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorStacking);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Background video",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.VideoEditor)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Always use default skin",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorDefaultSkin)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Snaking sliders",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorSnakingSliders)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Hit animations",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorHitAnimations)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Follow points",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorFollowPoints)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Stacking",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorStacking)
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Gameplay
|
||||
{
|
||||
public class GeneralGameplayOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "General";
|
||||
|
||||
private CheckBoxOption keyOverlay, hiddenApproachCircle, scaleManiaScroll, rememberManiaScroll;
|
||||
protected override string Header => "General";
|
||||
|
||||
public GeneralGameplayOptions()
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -20,24 +20,27 @@ namespace osu.Game.Overlays.Options.Gameplay
|
||||
new SpriteText { Text = "Progress display: TODO dropdown" },
|
||||
new SpriteText { Text = "Score meter type: TODO dropdown" },
|
||||
new SpriteText { Text = "Score meter size: TODO slider" },
|
||||
keyOverlay = new CheckBoxOption { LabelText = "Always show key overlay" },
|
||||
hiddenApproachCircle = new CheckBoxOption { LabelText = "Show approach circle on first \"Hidden\" object" },
|
||||
scaleManiaScroll = new CheckBoxOption { LabelText = "Scale osu!mania scroll speed with BPM" },
|
||||
rememberManiaScroll = new CheckBoxOption { LabelText = "Remember osu!mania scroll speed per beatmap" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Always show key overlay",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.KeyOverlay)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Show approach circle on first \"Hidden\" object",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.HiddenShowFirstApproach)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Scale osu!mania scroll speed with BPM",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ManiaSpeedBPMScale)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Remember osu!mania scroll speed per beatmap",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.UsePerBeatmapManiaSpeed)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
{
|
||||
keyOverlay.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.KeyOverlay);
|
||||
hiddenApproachCircle.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.HiddenShowFirstApproach);
|
||||
scaleManiaScroll.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ManiaSpeedBPMScale);
|
||||
rememberManiaScroll.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.UsePerBeatmapManiaSpeed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,47 +1,58 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Graphics
|
||||
{
|
||||
public class DetailOptions : OptionsSubsection
|
||||
{
|
||||
namespace osu.Game.Overlays.Options.Graphics
|
||||
{
|
||||
public class DetailOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Detail Settings";
|
||||
|
||||
private CheckBoxOption snakingSliders, backgroundVideo, storyboards, comboBursts,
|
||||
hitLighting, shaders, softeningFilter;
|
||||
|
||||
public DetailOptions()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
snakingSliders = new CheckBoxOption { LabelText = "Snaking sliders" },
|
||||
backgroundVideo = new CheckBoxOption { LabelText = "Background video" },
|
||||
storyboards = new CheckBoxOption { LabelText = "Storyboards" },
|
||||
comboBursts = new CheckBoxOption { LabelText = "Combo bursts" },
|
||||
hitLighting = new CheckBoxOption { LabelText = "Hit lighting" },
|
||||
shaders = new CheckBoxOption { LabelText = "Shaders" },
|
||||
softeningFilter = new CheckBoxOption { LabelText = "Softening filter" },
|
||||
new SpriteText { Text = "Screenshot format TODO: dropdown" }
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new Drawable[]
|
||||
{
|
||||
snakingSliders.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.SnakingSliders);
|
||||
backgroundVideo.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Video);
|
||||
storyboards.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ShowStoryboard);
|
||||
comboBursts.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ComboBurst);
|
||||
hitLighting.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.HitLighting);
|
||||
shaders.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Bloom);
|
||||
softeningFilter.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.BloomSoftening);
|
||||
}
|
||||
}
|
||||
}
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Snaking sliders",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.SnakingSliders)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Background video",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Video)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Storyboards",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ShowStoryboard)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Combo bursts",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ComboBurst)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Hit lighting",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.HitLighting)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Shaders",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Bloom)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Softening filter",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.BloomSoftening)
|
||||
},
|
||||
new SpriteText { Text = "Screenshot format TODO: dropdown" }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
@ -10,31 +11,27 @@ namespace osu.Game.Overlays.Options.Graphics
|
||||
{
|
||||
protected override string Header => "Layout";
|
||||
|
||||
private CheckBoxOption fullscreen, letterboxing;
|
||||
|
||||
public LayoutOptions()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteText { Text = "Resolution: TODO dropdown" },
|
||||
fullscreen = new CheckBoxOption { LabelText = "Fullscreen mode" },
|
||||
letterboxing = new CheckBoxOption { LabelText = "Letterboxing" },
|
||||
new SpriteText { Text = "Horizontal position" },
|
||||
new SpriteText { Text = "TODO: slider" },
|
||||
new SpriteText { Text = "Vertical position" },
|
||||
new SpriteText { Text = "TODO: slider" },
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new Drawable[]
|
||||
{
|
||||
fullscreen.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Fullscreen);
|
||||
letterboxing.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Letterboxing);
|
||||
}
|
||||
new SpriteText { Text = "Resolution: TODO dropdown" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Fullscreen mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Fullscreen),
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Letterboxing",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Letterboxing),
|
||||
},
|
||||
new SpriteText { Text = "Horizontal position" },
|
||||
new SpriteText { Text = "TODO: slider" },
|
||||
new SpriteText { Text = "Vertical position" },
|
||||
new SpriteText { Text = "TODO: slider" },
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,39 +1,45 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Graphics
|
||||
{
|
||||
public class MainMenuOptions : OptionsSubsection
|
||||
{
|
||||
namespace osu.Game.Overlays.Options.Graphics
|
||||
{
|
||||
public class MainMenuOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Main Menu";
|
||||
|
||||
private CheckBoxOption snow, parallax, tips, voices, musicTheme;
|
||||
|
||||
public MainMenuOptions()
|
||||
{
|
||||
Children = new[]
|
||||
{
|
||||
snow = new CheckBoxOption { LabelText = "Snow" },
|
||||
parallax = new CheckBoxOption { LabelText = "Parallax" },
|
||||
tips = new CheckBoxOption { LabelText = "Menu tips" },
|
||||
voices = new CheckBoxOption { LabelText = "Interface voices" },
|
||||
musicTheme = new CheckBoxOption { LabelText = "osu! music theme" },
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new[]
|
||||
{
|
||||
snow.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MenuSnow);
|
||||
parallax.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MenuParallax);
|
||||
tips.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ShowMenuTips);
|
||||
voices.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MenuVoice);
|
||||
musicTheme.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MenuMusic);
|
||||
}
|
||||
}
|
||||
}
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Snow",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuSnow)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Parallax",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuParallax)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Menu tips",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ShowMenuTips)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Interface voices",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuVoice)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "osu! music theme",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuMusic)
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
@ -10,30 +11,29 @@ namespace osu.Game.Overlays.Options.Graphics
|
||||
{
|
||||
protected override string Header => "Renderer";
|
||||
|
||||
private CheckBoxOption fpsCounter, reduceDroppedFrames, detectPerformanceIssues;
|
||||
|
||||
public RendererOptions()
|
||||
{
|
||||
// NOTE: Compatability mode omitted
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteText { Text = "Frame limiter: TODO dropdown" },
|
||||
fpsCounter = new CheckBoxOption { LabelText = "Show FPS counter" },
|
||||
reduceDroppedFrames = new CheckBoxOption { LabelText = "Reduce dropped frames" },
|
||||
detectPerformanceIssues = new CheckBoxOption { LabelText = "Detect performance issues" },
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
// NOTE: Compatability mode omitted
|
||||
Children = new Drawable[]
|
||||
{
|
||||
fpsCounter.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.FpsCounter);
|
||||
reduceDroppedFrames.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ForceFrameFlush);
|
||||
detectPerformanceIssues.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.DetectPerformanceIssues);
|
||||
}
|
||||
new SpriteText { Text = "Frame limiter: TODO dropdown" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Show FPS counter",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.FpsCounter),
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Reduce dropped frames",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ForceFrameFlush),
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Detect performance issues",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.DetectPerformanceIssues),
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,31 +1,25 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Graphics
|
||||
{
|
||||
public class SongSelectGraphicsOptions : OptionsSubsection
|
||||
{
|
||||
namespace osu.Game.Overlays.Options.Graphics
|
||||
{
|
||||
public class SongSelectGraphicsOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Song Select";
|
||||
|
||||
private CheckBoxOption showThumbs;
|
||||
|
||||
public SongSelectGraphicsOptions()
|
||||
{
|
||||
Children = new[]
|
||||
{
|
||||
showThumbs = new CheckBoxOption { LabelText = "Show thumbnails" }
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new[]
|
||||
{
|
||||
showThumbs.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.SongSelectThumbnails);
|
||||
}
|
||||
}
|
||||
}
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Show thumbnails",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.SongSelectThumbnails)
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,43 +1,55 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Input
|
||||
{
|
||||
public class MouseOptions : OptionsSubsection
|
||||
{
|
||||
namespace osu.Game.Overlays.Options.Input
|
||||
{
|
||||
public class MouseOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Mouse";
|
||||
|
||||
private CheckBoxOption rawInput, mapRawInput, disableWheel, disableButtons, enableRipples;
|
||||
|
||||
public MouseOptions()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteText { Text = "Sensitivity: TODO slider" },
|
||||
rawInput = new CheckBoxOption { LabelText = "Raw input" },
|
||||
mapRawInput = new CheckBoxOption { LabelText = "Map absolute raw input to the osu! window" },
|
||||
new SpriteText { Text = "Confine mouse cursor: TODO dropdown" },
|
||||
disableWheel = new CheckBoxOption { LabelText = "Disable mouse wheel in play mode" },
|
||||
disableButtons = new CheckBoxOption { LabelText = "Disable mouse buttons in play mode" },
|
||||
enableRipples = new CheckBoxOption { LabelText = "Cursor ripples" },
|
||||
};
|
||||
private CheckBoxOption rawInput, mapRawInput, disableWheel, disableButtons, enableRipples;
|
||||
|
||||
public MouseOptions()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new Drawable[]
|
||||
{
|
||||
rawInput.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.RawInput);
|
||||
mapRawInput.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow);
|
||||
disableWheel.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MouseDisableWheel);
|
||||
disableButtons.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MouseDisableButtons);
|
||||
enableRipples.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.CursorRipple);
|
||||
}
|
||||
}
|
||||
}
|
||||
new SpriteText { Text = "Sensitivity: TODO slider" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Raw input",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.RawInput)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Map absolute raw input to the osu! window",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow)
|
||||
},
|
||||
new SpriteText { Text = "Confine mouse cursor: TODO dropdown" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Disable mouse wheel in play mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableWheel)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Disable mouse buttons in play mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableButtons)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Cursor ripples",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.CursorRipple)
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,35 +1,32 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Input
|
||||
{
|
||||
public class OtherInputOptions : OptionsSubsection
|
||||
{
|
||||
namespace osu.Game.Overlays.Options.Input
|
||||
{
|
||||
public class OtherInputOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Other";
|
||||
|
||||
private CheckBoxOption tabletSupport, wiimoteSupport;
|
||||
|
||||
public OtherInputOptions()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
tabletSupport = new CheckBoxOption { LabelText = "OS TabletPC support" },
|
||||
wiimoteSupport = new CheckBoxOption { LabelText = "Wiimote/TaTaCon Drum Support" },
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new Drawable[]
|
||||
{
|
||||
tabletSupport.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Tablet);
|
||||
wiimoteSupport.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Wiimote);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "OS TabletPC support",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Tablet)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Wiimote/TaTaCon Drum Support",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Wiimote)
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,43 +1,46 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Online
|
||||
{
|
||||
public class InGameChatOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "In-game Chat";
|
||||
|
||||
private CheckBoxOption filterWords, filterForeign, logPMs, blockPMs;
|
||||
protected override string Header => "In-game Chat";
|
||||
|
||||
public InGameChatOptions()
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
filterWords = new CheckBoxOption { LabelText = "Filter offensive words" },
|
||||
filterForeign = new CheckBoxOption { LabelText = "Filter foreign characters" },
|
||||
logPMs = new CheckBoxOption { LabelText = "Log private messages" },
|
||||
blockPMs = new CheckBoxOption { LabelText = "Block private messages from non-friends" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Filter offensive words",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatFilter)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Filter foreign characters",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatRemoveForeign)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Log private messages",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.LogPrivateMessages)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Block private messages from non-friends",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.BlockNonFriendPM)
|
||||
},
|
||||
new SpriteText { Text = "Chat ignore list (space-seperated list)" },
|
||||
new TextBox { Height = 20, RelativeSizeAxes = Axes.X },
|
||||
new SpriteText { Text = "Chat highlight words (space-seperated list)" },
|
||||
new TextBox { Height = 20, RelativeSizeAxes = Axes.X },
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
{
|
||||
filterWords.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatFilter);
|
||||
filterForeign.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatRemoveForeign);
|
||||
logPMs.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.LogPrivateMessages);
|
||||
blockPMs.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.BlockNonFriendPM);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
@ -9,35 +10,42 @@ namespace osu.Game.Overlays.Options.Online
|
||||
{
|
||||
protected override string Header => "Notifications";
|
||||
|
||||
private CheckBoxOption chatTicker, notifyMention, notifyChat, audibleNotification,
|
||||
notificationsDuringGameplay, notifyFriendStatus;
|
||||
|
||||
public NotificationsOptions()
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
chatTicker = new CheckBoxOption { LabelText = "Enable chat ticker" },
|
||||
notifyMention = new CheckBoxOption { LabelText = "Show a notification popup when someone says your name" },
|
||||
notifyChat = new CheckBoxOption { LabelText = "Show chat message notifications" },
|
||||
audibleNotification = new CheckBoxOption { LabelText = "Play a sound when someone says your name" },
|
||||
notificationsDuringGameplay = new CheckBoxOption { LabelText = "Show notification popups instantly during gameplay" },
|
||||
notifyFriendStatus = new CheckBoxOption { LabelText = "Show notification popups when friends change status" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Enable chat ticker",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Ticker)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Show a notification popup when someone says your name",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatHighlightName)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Show chat message notifications",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatMessageNotification)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Play a sound when someone says your name",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatAudibleHighlight)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Show notification popups instantly during gameplay",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.PopupDuringGameplay)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Show notification popups when friends change status",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.NotifyFriends)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
{
|
||||
chatTicker.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Ticker);
|
||||
notifyMention.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatHighlightName);
|
||||
notifyChat.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatMessageNotification);
|
||||
audibleNotification.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.ChatAudibleHighlight);
|
||||
notificationsDuringGameplay.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.PopupDuringGameplay);
|
||||
notifyFriendStatus.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.NotifyFriends);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,38 +1,41 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Online
|
||||
{
|
||||
public class OnlineIntegrationOptions : OptionsSubsection
|
||||
{
|
||||
namespace osu.Game.Overlays.Options.Online
|
||||
{
|
||||
public class OnlineIntegrationOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Integration";
|
||||
|
||||
private CheckBoxOption yahoo, msn, autoDirect, noVideo;
|
||||
|
||||
public OnlineIntegrationOptions()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
yahoo = new CheckBoxOption { LabelText = "Integrate with Yahoo! status display" },
|
||||
msn = new CheckBoxOption { LabelText = "Integrate with MSN Live status display" },
|
||||
autoDirect = new CheckBoxOption { LabelText = "Automatically start osu!direct downloads" },
|
||||
noVideo = new CheckBoxOption { LabelText = "Prefer no-video downloads" },
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new Drawable[]
|
||||
{
|
||||
yahoo.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.YahooIntegration);
|
||||
msn.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MsnIntegration);
|
||||
autoDirect.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AutomaticDownload);
|
||||
noVideo.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AutomaticDownloadNoVideo);
|
||||
}
|
||||
}
|
||||
}
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Integrate with Yahoo! status display",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.YahooIntegration)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Integrate with MSN Live status display",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MsnIntegration)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Automatically start osu!direct downloads",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AutomaticDownload)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Prefer no-video downloads",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AutomaticDownloadNoVideo)
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
@ -8,27 +9,23 @@ namespace osu.Game.Overlays.Options.Online
|
||||
public class PrivacyOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Privacy";
|
||||
|
||||
private CheckBoxOption shareCity, allowInvites;
|
||||
|
||||
public PrivacyOptions()
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
shareCity = new CheckBoxOption { LabelText = "Share your city location with others" },
|
||||
allowInvites = new CheckBoxOption { LabelText = "Allow multiplayer game invites from all users" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Share your city location with others",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.DisplayCityLocation)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Allow multiplayer game invites from all users",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AllowPublicInvites)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
{
|
||||
shareCity.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.DisplayCityLocation);
|
||||
allowInvites.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AllowPublicInvites);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,22 +1,22 @@
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Overlays.Options
|
||||
{
|
||||
public class SkinSection : OptionsSection
|
||||
{
|
||||
protected override string Header => "Skin";
|
||||
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
|
||||
|
||||
private CheckBoxOption ignoreSkins, useSkinSoundSamples, useTaikoSkin, useSkinCursor, autoCursorSize;
|
||||
|
||||
public SkinSection()
|
||||
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
|
||||
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
content.Spacing = new Vector2(0, 5);
|
||||
Children = new Drawable[]
|
||||
@ -38,27 +38,33 @@ namespace osu.Game.Overlays.Options
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Text = "Export as .osk",
|
||||
},
|
||||
ignoreSkins = new CheckBoxOption { LabelText = "Ignore all beatmap skins" },
|
||||
useSkinSoundSamples = new CheckBoxOption { LabelText = "Use skin's sound samples" },
|
||||
useTaikoSkin = new CheckBoxOption { LabelText = "Use Taiko skin for Taiko mode" },
|
||||
useSkinCursor = new CheckBoxOption { LabelText = "Always use skin cursor" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Ignore all beatmap skins",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSkins)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Use skin's sound samples",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.SkinSamples)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Use Taiko skin for Taiko mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.UseTaikoSkin)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Always use skin cursor",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.UseSkinCursor)
|
||||
},
|
||||
new SpriteText { Text = "Cursor size: TODO slider" },
|
||||
autoCursorSize = new CheckBoxOption { LabelText = "Automatic cursor size" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Automatic cursor size",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AutomaticCursorSizing)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
{
|
||||
ignoreSkins.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSkins);
|
||||
useSkinSoundSamples.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.SkinSamples);
|
||||
useTaikoSkin.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.UseTaikoSkin);
|
||||
useSkinCursor.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.UseSkinCursor);
|
||||
autoCursorSize.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AutomaticCursorSizing);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user