diff --git a/BeatSaberMarkupLanguage/Components/Settings/ListSliderSetting.cs b/BeatSaberMarkupLanguage/Components/Settings/ListSliderSetting.cs index 3c65c9bf..8992ce63 100644 --- a/BeatSaberMarkupLanguage/Components/Settings/ListSliderSetting.cs +++ b/BeatSaberMarkupLanguage/Components/Settings/ListSliderSetting.cs @@ -30,7 +30,6 @@ public override void Setup() text = slider.GetComponentInChildren(); slider.numberOfSteps = values.Count; slider.valueDidChangeEvent += OnChange; - StartCoroutine(SetInitialText()); } public override void ApplyValue() @@ -54,19 +53,6 @@ protected string TextForValue(object value) private void Awake() { ReceiveValue(); - } - - private void OnEnable() - { - StartCoroutine(SetInitialText()); - } - - // I don't really like this but for some reason I can't get the initial starting text any other quick way and this works perfectly fine - private IEnumerator SetInitialText() - { - yield return new WaitForFixedUpdate(); - text.text = TextForValue(Value); - yield return new WaitForSeconds(0.1f); // If the first one is too fast, don't yell at me pls text.text = TextForValue(Value); } diff --git a/BeatSaberMarkupLanguage/Plugin.cs b/BeatSaberMarkupLanguage/Plugin.cs index 3460bcfa..85a82730 100644 --- a/BeatSaberMarkupLanguage/Plugin.cs +++ b/BeatSaberMarkupLanguage/Plugin.cs @@ -119,10 +119,10 @@ public void OnExit() public void MenuLoadFresh(ScenesTransitionSetupDataSO scenesTransitionSetupData, DiContainer diContainer) { - // GameplaySetup.GameplaySetup.instance.AddTab("Test", "BeatSaberMarkupLanguage.Views.gameplay-setup-test.bsml", GameplaySetupTest.instance); + // GameplaySetup.GameplaySetup.instance.AddTab("Test", "BeatSaberMarkupLanguage.Views.gameplay-setup-test.bsml", GameplaySetup.GameplaySetupTest.instance); // BSMLSettings.instance.AddSettingsMenu("Test", "BeatSaberMarkupLanguage.Views.settings-test.bsml", SettingsTest.instance); - // SharedCoroutineStarter.instance.StartCoroutine(PresentTest()); - // SharedCoroutineStarter.instance.StartCoroutine(PresentTest()); + // SharedCoroutineStarter.instance.StartCoroutine(PresentTest()); + // SharedCoroutineStarter.instance.StartCoroutine(PresentTest()); // MenuButtons.MenuButtons.instance.RegisterButton(new MenuButtons.MenuButton("test", () => MenuButtons.MenuButtons.instance.RegisterButton(new MenuButtons.MenuButton("test2",null)))); BSMLSettings.instance.Setup(); MenuButtons.MenuButtons.instance.Setup(); @@ -161,13 +161,13 @@ private void OnInstallEarlyBindings(ScenesTransitionSetupDataSO setupData, DiCon // It's just for testing so don't yell at me /*private IEnumerator PresentTest() - where T : ViewController + where T : HMUI.ViewController { yield return new WaitForSeconds(1); - ViewController testViewController = BeatSaberUI.CreateViewController(); + HMUI.ViewController testViewController = BeatSaberUI.CreateViewController(); FloatingScreen.FloatingScreen floatingScreen = FloatingScreen.FloatingScreen.CreateFloatingScreen(new Vector2(400, 200), true, Vector3.zero, Quaternion.identity); - floatingScreen.SetRootViewController(testViewController, ViewController.AnimationType.None); - Resources.FindObjectsOfTypeAll().First().PresentViewController(testViewController, null, ViewController.AnimationDirection.Horizontal, false); + floatingScreen.SetRootViewController(testViewController, HMUI.ViewController.AnimationType.None); + Resources.FindObjectsOfTypeAll().First().PresentViewController(testViewController, null, HMUI.ViewController.AnimationDirection.Horizontal, false); }*/ } } diff --git a/BeatSaberMarkupLanguage/Settings/SettingsTest.cs b/BeatSaberMarkupLanguage/Settings/SettingsTest.cs index 41be8ad5..52d8a0fc 100644 --- a/BeatSaberMarkupLanguage/Settings/SettingsTest.cs +++ b/BeatSaberMarkupLanguage/Settings/SettingsTest.cs @@ -27,7 +27,7 @@ public class SettingsTest : NotifiableSingleton private List options = new object[] { "1", "Something", "Kapow", "Yeet" }.ToList(); [UIValue("list-choice")] - private string listChoice = "Something"; + private string listChoice = "Kapow"; [UIValue("bool-test")] private bool BoolTest diff --git a/BeatSaberMarkupLanguage/Views/settings-test.bsml b/BeatSaberMarkupLanguage/Views/settings-test.bsml index 2b2431a5..a43ae638 100644 --- a/BeatSaberMarkupLanguage/Views/settings-test.bsml +++ b/BeatSaberMarkupLanguage/Views/settings-test.bsml @@ -3,6 +3,7 @@ +