1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 06:52:56 +08:00

Rename interaction toggle method

This commit is contained in:
Dean Herbert 2022-05-18 21:22:17 +09:00
parent fa09270e62
commit d54e1503c7

View File

@ -91,7 +91,7 @@ namespace osu.Game.Overlays.FirstRunSetup
if (storage == null) if (storage == null)
{ {
allowInteraction(false); toggleInteraction(false);
stableLocatorTextBox.Current.Disabled = false; stableLocatorTextBox.Current.Disabled = false;
stableLocatorTextBox.Current.Value = string.Empty; stableLocatorTextBox.Current.Value = string.Empty;
@ -104,14 +104,14 @@ namespace osu.Game.Overlays.FirstRunSetup
c.UpdateCount(); c.UpdateCount();
} }
allowInteraction(true); toggleInteraction(true);
stableLocatorTextBox.Current.Value = storage.GetFullPath(string.Empty); stableLocatorTextBox.Current.Value = storage.GetFullPath(string.Empty);
importButton.Enabled.Value = true; importButton.Enabled.Value = true;
} }
private void runImport() private void runImport()
{ {
allowInteraction(false); toggleInteraction(false);
progressText.FadeIn(1000, Easing.OutQuint); progressText.FadeIn(1000, Easing.OutQuint);
StableContent importableContent = 0; StableContent importableContent = 0;
@ -127,13 +127,13 @@ namespace osu.Game.Overlays.FirstRunSetup
importButton.Complete(); importButton.Complete();
else else
{ {
allowInteraction(true); toggleInteraction(true);
importButton.Abort(); importButton.Abort();
} }
})); }));
} }
private void allowInteraction(bool allow) private void toggleInteraction(bool allow)
{ {
importButton.Enabled.Value = allow; importButton.Enabled.Value = allow;
stableLocatorTextBox.Current.Disabled = !allow; stableLocatorTextBox.Current.Disabled = !allow;