1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Move in-memory logic to a base class

This commit is contained in:
iiSaLMaN 2019-09-25 01:25:05 +03:00
parent 267e12ce3c
commit d013b73d33
2 changed files with 25 additions and 7 deletions

View File

@ -0,0 +1,22 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Configuration;
namespace osu.Game.Configuration
{
public class InMemoryConfigManager<T> : ConfigManager<T>
where T : struct
{
public InMemoryConfigManager()
{
InitialiseDefaults();
}
protected override void PerformLoad()
{
}
protected override bool PerformSave() => true;
}
}

View File

@ -1,18 +1,14 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Configuration;
namespace osu.Game.Configuration
{
public class SessionStatics : ConfigManager<Statics>
public class SessionStatics : InMemoryConfigManager<Statics>
{
// This is an in-memory store.
protected override void PerformLoad()
protected override void InitialiseDefaults()
{
Set(Statics.LoginOverlayDisplayed, false);
}
protected override bool PerformSave() => true;
}
public enum Statics