2018-01-05 11:21:19 +00:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-02-07 04:59:30 +00:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2016-08-26 03:28:23 +00:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Configuration;
|
2016-10-31 18:44:20 +00:00
|
|
|
|
using osu.Framework.Platform;
|
2017-05-12 04:54:02 +00:00
|
|
|
|
using osu.Game.Overlays;
|
2017-04-24 10:25:27 +00:00
|
|
|
|
using osu.Game.Screens.Select;
|
2016-08-26 03:28:23 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Configuration
|
|
|
|
|
{
|
2018-01-24 08:35:37 +00:00
|
|
|
|
public class OsuConfigManager : IniConfigManager<OsuSetting>
|
2016-08-26 03:28:23 +00:00
|
|
|
|
{
|
|
|
|
|
protected override void InitialiseDefaults()
|
|
|
|
|
{
|
2017-05-02 08:45:22 +00:00
|
|
|
|
// UI/selection defaults
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.Ruleset, 0, 0, int.MaxValue);
|
2018-02-22 07:29:05 +00:00
|
|
|
|
Set(OsuSetting.Skin, 0, 0, int.MaxValue);
|
|
|
|
|
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Details);
|
2017-05-02 08:45:22 +00:00
|
|
|
|
|
2017-11-24 09:34:20 +00:00
|
|
|
|
Set(OsuSetting.ShowConvertedBeatmaps, true);
|
2017-11-06 06:28:17 +00:00
|
|
|
|
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
|
|
|
|
|
Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10, 0.1);
|
2017-05-02 10:40:30 +00:00
|
|
|
|
|
2017-12-13 09:10:32 +00:00
|
|
|
|
Set(OsuSetting.RandomSelectAlgorithm, RandomSelectAlgorithm.RandomPermutation);
|
2017-05-31 16:41:15 +00:00
|
|
|
|
|
2017-11-28 03:09:44 +00:00
|
|
|
|
Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1);
|
2017-05-12 04:54:02 +00:00
|
|
|
|
|
2017-05-02 08:45:22 +00:00
|
|
|
|
// Online settings
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.Username, string.Empty);
|
|
|
|
|
Set(OsuSetting.Token, string.Empty);
|
2016-10-04 08:15:03 +00:00
|
|
|
|
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.SavePassword, false).ValueChanged += val =>
|
2017-05-02 08:45:22 +00:00
|
|
|
|
{
|
2017-05-15 01:56:27 +00:00
|
|
|
|
if (val) Set(OsuSetting.SaveUsername, true);
|
2017-05-02 08:45:22 +00:00
|
|
|
|
};
|
|
|
|
|
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.SaveUsername, true).ValueChanged += val =>
|
2017-05-02 08:45:22 +00:00
|
|
|
|
{
|
2017-05-15 01:56:27 +00:00
|
|
|
|
if (!val) Set(OsuSetting.SavePassword, false);
|
2017-05-02 08:45:22 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Audio
|
2018-01-31 09:11:38 +00:00
|
|
|
|
Set(OsuSetting.VolumeInactive, 0.25, 0, 1, 0.01);
|
|
|
|
|
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.MenuVoice, true);
|
|
|
|
|
Set(OsuSetting.MenuMusic, true);
|
2017-05-02 08:45:22 +00:00
|
|
|
|
|
2017-11-06 06:28:17 +00:00
|
|
|
|
Set(OsuSetting.AudioOffset, 0, -500.0, 500.0, 1);
|
2017-05-02 08:45:22 +00:00
|
|
|
|
|
|
|
|
|
// Input
|
2017-11-06 06:28:17 +00:00
|
|
|
|
Set(OsuSetting.MenuCursorSize, 1.0, 0.5f, 2, 0.01);
|
|
|
|
|
Set(OsuSetting.GameplayCursorSize, 1.0, 0.5f, 2, 0.01);
|
2017-05-15 03:21:43 +00:00
|
|
|
|
Set(OsuSetting.AutoCursorSize, false);
|
2017-02-13 15:35:24 +00:00
|
|
|
|
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.MouseDisableButtons, false);
|
|
|
|
|
Set(OsuSetting.MouseDisableWheel, false);
|
2017-02-13 15:35:24 +00:00
|
|
|
|
|
2017-05-02 08:45:22 +00:00
|
|
|
|
// Graphics
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.ShowFpsDisplay, false);
|
2017-05-03 11:34:53 +00:00
|
|
|
|
|
2017-09-14 13:44:36 +00:00
|
|
|
|
Set(OsuSetting.ShowStoryboard, true);
|
2017-09-16 22:47:55 +00:00
|
|
|
|
Set(OsuSetting.CursorRotation, true);
|
2017-09-14 13:44:36 +00:00
|
|
|
|
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.MenuParallax, true);
|
2017-03-01 10:22:01 +00:00
|
|
|
|
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.SnakingInSliders, true);
|
|
|
|
|
Set(OsuSetting.SnakingOutSliders, true);
|
2017-04-25 03:48:25 +00:00
|
|
|
|
|
2017-05-02 09:40:30 +00:00
|
|
|
|
// Gameplay
|
2017-11-06 06:28:17 +00:00
|
|
|
|
Set(OsuSetting.DimLevel, 0.3, 0, 1, 0.01);
|
2017-12-26 01:11:49 +00:00
|
|
|
|
Set(OsuSetting.BlurLevel, 0, 0, 1, 0.01);
|
2017-04-24 10:25:27 +00:00
|
|
|
|
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.ShowInterface, true);
|
|
|
|
|
Set(OsuSetting.KeyOverlay, false);
|
2017-02-13 15:35:24 +00:00
|
|
|
|
|
2017-05-17 12:39:26 +00:00
|
|
|
|
Set(OsuSetting.FloatingComments, false);
|
|
|
|
|
|
2018-01-12 08:18:34 +00:00
|
|
|
|
Set(OsuSetting.SpeedChangeVisualisation, SpeedChangeVisualisationMethod.Sequential);
|
2018-01-08 02:34:37 +00:00
|
|
|
|
|
2017-05-02 09:40:30 +00:00
|
|
|
|
// Update
|
2017-05-15 01:56:27 +00:00
|
|
|
|
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
2017-08-22 10:41:39 +00:00
|
|
|
|
|
|
|
|
|
Set(OsuSetting.Version, string.Empty);
|
2017-01-28 10:10:05 +00:00
|
|
|
|
}
|
2016-10-31 18:44:20 +00:00
|
|
|
|
|
2017-02-23 06:38:17 +00:00
|
|
|
|
public OsuConfigManager(Storage storage) : base(storage)
|
2016-10-31 18:44:20 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2016-08-26 03:28:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
2017-05-15 01:56:27 +00:00
|
|
|
|
public enum OsuSetting
|
2016-08-26 03:28:23 +00:00
|
|
|
|
{
|
2017-04-14 20:22:41 +00:00
|
|
|
|
Ruleset,
|
2016-11-02 23:37:52 +00:00
|
|
|
|
Token,
|
2017-03-21 16:16:23 +00:00
|
|
|
|
MenuCursorSize,
|
2017-03-17 17:40:03 +00:00
|
|
|
|
GameplayCursorSize,
|
2017-05-13 00:46:37 +00:00
|
|
|
|
AutoCursorSize,
|
2016-11-02 23:37:52 +00:00
|
|
|
|
DimLevel,
|
2017-12-26 01:11:49 +00:00
|
|
|
|
BlurLevel,
|
2017-09-14 13:44:36 +00:00
|
|
|
|
ShowStoryboard,
|
2016-11-02 23:37:52 +00:00
|
|
|
|
KeyOverlay,
|
2017-05-17 12:39:26 +00:00
|
|
|
|
FloatingComments,
|
2016-11-02 23:37:52 +00:00
|
|
|
|
ShowInterface,
|
|
|
|
|
MouseDisableButtons,
|
|
|
|
|
MouseDisableWheel,
|
2017-04-21 07:19:40 +00:00
|
|
|
|
AudioOffset,
|
2018-01-31 09:11:38 +00:00
|
|
|
|
VolumeInactive,
|
2016-11-02 23:37:52 +00:00
|
|
|
|
MenuMusic,
|
|
|
|
|
MenuVoice,
|
2017-09-16 22:47:55 +00:00
|
|
|
|
CursorRotation,
|
2016-11-02 23:37:52 +00:00
|
|
|
|
MenuParallax,
|
2017-04-24 10:25:27 +00:00
|
|
|
|
BeatmapDetailTab,
|
2016-11-02 23:37:52 +00:00
|
|
|
|
Username,
|
|
|
|
|
ReleaseStream,
|
|
|
|
|
SavePassword,
|
|
|
|
|
SaveUsername,
|
2017-05-02 10:40:30 +00:00
|
|
|
|
DisplayStarsMinimum,
|
|
|
|
|
DisplayStarsMaximum,
|
2017-12-13 09:10:32 +00:00
|
|
|
|
RandomSelectAlgorithm,
|
2017-05-02 10:40:30 +00:00
|
|
|
|
SnakingInSliders,
|
2017-05-03 11:34:53 +00:00
|
|
|
|
SnakingOutSliders,
|
2017-05-12 04:54:02 +00:00
|
|
|
|
ShowFpsDisplay,
|
2017-08-22 10:41:39 +00:00
|
|
|
|
ChatDisplayHeight,
|
2017-11-24 09:34:20 +00:00
|
|
|
|
Version,
|
2018-01-08 02:34:37 +00:00
|
|
|
|
ShowConvertedBeatmaps,
|
2018-02-22 07:29:05 +00:00
|
|
|
|
SpeedChangeVisualisation,
|
|
|
|
|
Skin
|
2016-08-26 03:28:23 +00:00
|
|
|
|
}
|
|
|
|
|
}
|