mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 18:32:55 +08:00
Fix unsafe config fetching
This commit is contained in:
parent
186999c4eb
commit
c078c06902
@ -150,10 +150,14 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
public void TestChatHeight()
|
public void TestChatHeight()
|
||||||
{
|
{
|
||||||
BindableFloat configChatHeight = new BindableFloat();
|
BindableFloat configChatHeight = new BindableFloat();
|
||||||
config.BindWith(OsuSetting.ChatDisplayHeight, configChatHeight);
|
|
||||||
float newHeight = 0;
|
float newHeight = 0;
|
||||||
|
|
||||||
AddStep("Reset config chat height", () => configChatHeight.SetDefault());
|
AddStep("Reset config chat height", () =>
|
||||||
|
{
|
||||||
|
config.BindWith(OsuSetting.ChatDisplayHeight, configChatHeight);
|
||||||
|
configChatHeight.SetDefault();
|
||||||
|
});
|
||||||
AddStep("Show overlay", () => chatOverlay.Show());
|
AddStep("Show overlay", () => chatOverlay.Show());
|
||||||
AddAssert("Overlay uses config height", () => chatOverlay.Height == configChatHeight.Default);
|
AddAssert("Overlay uses config height", () => chatOverlay.Height == configChatHeight.Default);
|
||||||
AddStep("Click top bar", () =>
|
AddStep("Click top bar", () =>
|
||||||
|
Loading…
Reference in New Issue
Block a user