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