Change to use ReadableKeyCombinationProvider

Changes all usages of `KeyCombination.ReadableString()` to
`ReadableKeyCombinationProvider.GetReadableString()`.

Subscribing to `KeymapChanged` is only required in `KeyButton`.
All other places query `GetReadableString()` every time.
This commit is contained in:
Susko3
2021-11-08 06:55:26 +01:00
parent f776ff3d8c
commit c3069ad002
5 changed files with 43 additions and 9 deletions

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Framework.Platform;
using osu.Game.Database;
@ -33,7 +34,7 @@ namespace osu.Game.Tests.Database
storage = new NativeStorage(directory.FullName);
realmContextFactory = new RealmContextFactory(storage, "test");
keyBindingStore = new RealmKeyBindingStore(realmContextFactory);
keyBindingStore = new RealmKeyBindingStore(realmContextFactory, new ReadableKeyCombinationProvider());
}
[Test]