mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +08:00
Merge pull request #4784 from peppy/remember-fps-display-state
Remember FPS display state after changing via Ctrl+F11 hotkey
This commit is contained in:
commit
c04cdd170a
@ -9,7 +9,7 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
public class TestCaseLoadingAnimation : GridTestCase
|
||||
public class TestCaseLoadingAnimation : GridTestScene //todo: this should be an OsuTestCase
|
||||
{
|
||||
public TestCaseLoadingAnimation()
|
||||
: base(2, 2)
|
||||
|
@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
@ -17,7 +16,7 @@ using osuTK.Graphics;
|
||||
namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCaseOsuIcon : TestCase
|
||||
public class TestCaseOsuIcon : OsuTestCase
|
||||
{
|
||||
public TestCaseOsuIcon()
|
||||
{
|
||||
|
@ -220,8 +220,10 @@ namespace osu.Game
|
||||
// TODO: This is temporary until we reimplement the local FPS display.
|
||||
// It's just to allow end-users to access the framework FPS display without knowing the shortcut key.
|
||||
fpsDisplayVisible = LocalConfig.GetBindable<bool>(OsuSetting.ShowFpsDisplay);
|
||||
fpsDisplayVisible.ValueChanged += visible => { FrameStatisticsMode = visible.NewValue ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None; };
|
||||
fpsDisplayVisible.ValueChanged += visible => { FrameStatistics.Value = visible.NewValue ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None; };
|
||||
fpsDisplayVisible.TriggerChange();
|
||||
|
||||
FrameStatistics.ValueChanged += e => fpsDisplayVisible.Value = e.NewValue != FrameStatisticsMode.None;
|
||||
}
|
||||
|
||||
private void runMigrations()
|
||||
|
@ -15,7 +15,7 @@ using osu.Game.Rulesets.Mods;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public abstract class OsuTestCase : TestCase
|
||||
public abstract class OsuTestCase : TestScene
|
||||
{
|
||||
[Cached(typeof(Bindable<WorkingBeatmap>))]
|
||||
[Cached(typeof(IBindable<WorkingBeatmap>))]
|
||||
@ -76,21 +76,21 @@ namespace osu.Game.Tests.Visual
|
||||
}
|
||||
}
|
||||
|
||||
protected override ITestCaseTestRunner CreateRunner() => new OsuTestCaseTestRunner();
|
||||
protected override ITestSceneTestRunner CreateRunner() => new OsuTestCaseTestRunner();
|
||||
|
||||
public class OsuTestCaseTestRunner : OsuGameBase, ITestCaseTestRunner
|
||||
public class OsuTestCaseTestRunner : OsuGameBase, ITestSceneTestRunner
|
||||
{
|
||||
private TestCaseTestRunner.TestRunner runner;
|
||||
private TestSceneTestRunner.TestRunner runner;
|
||||
|
||||
protected override void LoadAsyncComplete()
|
||||
{
|
||||
// this has to be run here rather than LoadComplete because
|
||||
// TestCase.cs is checking the IsLoaded state (on another thread) and expects
|
||||
// the runner to be loaded at that point.
|
||||
Add(runner = new TestCaseTestRunner.TestRunner());
|
||||
Add(runner = new TestSceneTestRunner.TestRunner());
|
||||
}
|
||||
|
||||
public void RunTestBlocking(TestCase test) => runner.RunTestBlocking(test);
|
||||
public void RunTestBlocking(TestScene test) => runner.RunTestBlocking(test);
|
||||
}
|
||||
|
||||
private class OsuTestBeatmap : BindableBeatmap
|
||||
|
@ -15,7 +15,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.502.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.508.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.514.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.23.0" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
@ -105,8 +105,8 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.502.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.502.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.514.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.514.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
Loading…
Reference in New Issue
Block a user