mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 12:42:54 +08:00
Update usages of AddToggle in Tests
This commit is contained in:
parent
0c2089ddd7
commit
1b92519a86
@ -1 +1 @@
|
|||||||
Subproject commit 7cad7cf48b2ae9f16cac503d46bd0ea801e7561f
|
Subproject commit 5e038727036aec5cb0005a4eab30fd73fa5ceb18
|
@ -95,7 +95,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
AddButton(@"slider", () => load(HitObjectType.Slider));
|
AddButton(@"slider", () => load(HitObjectType.Slider));
|
||||||
AddButton(@"spinner", () => load(HitObjectType.Spinner));
|
AddButton(@"spinner", () => load(HitObjectType.Spinner));
|
||||||
|
|
||||||
AddToggle(@"auto", () => { auto = !auto; load(mode); });
|
AddToggle(@"auto", (state) => { auto = state; load(mode); });
|
||||||
|
|
||||||
ButtonsContainer.Add(new SpriteText { Text = "Playback Speed" });
|
ButtonsContainer.Add(new SpriteText { Text = "Playback Speed" });
|
||||||
ButtonsContainer.Add(new BasicSliderBar<double>
|
ButtonsContainer.Add(new BasicSliderBar<double>
|
||||||
|
@ -5,6 +5,7 @@ using osu.Framework.Screens.Testing;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
@ -30,7 +31,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Anchor = Anchor.Centre
|
Anchor = Anchor.Centre
|
||||||
};
|
};
|
||||||
Add(mc);
|
Add(mc);
|
||||||
AddToggle(@"Show", mc.ToggleVisibility);
|
AddToggle(@"Show", (state) => mc.State = state ? Visibility.Visible : Visibility.Hidden);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ using osu.Framework.MathUtils;
|
|||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Overlays.Notifications;
|
using osu.Game.Overlays.Notifications;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
@ -30,7 +31,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
});
|
});
|
||||||
|
|
||||||
AddToggle(@"show", manager.ToggleVisibility);
|
AddToggle(@"show", (state) => manager.State = state ? Visibility.Visible : Visibility.Hidden);
|
||||||
|
|
||||||
AddButton(@"simple #1", sendNotification1);
|
AddButton(@"simple #1", sendNotification1);
|
||||||
AddButton(@"simple #2", sendNotification2);
|
AddButton(@"simple #2", sendNotification2);
|
||||||
|
Loading…
Reference in New Issue
Block a user