diff --git a/src/OWML.Common/OWML.Common.csproj b/src/OWML.Common/OWML.Common.csproj index 8b2e7cc80..3dcc23a5f 100644 --- a/src/OWML.Common/OWML.Common.csproj +++ b/src/OWML.Common/OWML.Common.csproj @@ -6,7 +6,9 @@ - + + runtime + diff --git a/src/OWML.ModHelper.Menus/ModMenuWithSelectables.cs b/src/OWML.ModHelper.Menus/ModMenuWithSelectables.cs index 0e0fb5863..54bd37c69 100644 --- a/src/OWML.ModHelper.Menus/ModMenuWithSelectables.cs +++ b/src/OWML.ModHelper.Menus/ModMenuWithSelectables.cs @@ -79,11 +79,7 @@ public override void Initialize(Menu menu) UpdateNavigation(); } - public override void SelectFirst() - { - //Locator.GetMenuInputModule().SelectOnNextUpdate(Selectables[0]); - Menu.SetSelectOnActivate(Selectables[0]); - } + public override void SelectFirst() => Menu.SetSelectOnActivate(Selectables[0]); public override void UpdateNavigation() { @@ -93,29 +89,6 @@ public override void UpdateNavigation() UpdateNavigation(Selectables); } - protected virtual void RemoveSelectable(Selectable selectable) - { - var index = Selectables.IndexOf(selectable); - var upIndex = (index - 1 + Selectables.Count) % Selectables.Count; - var downIndex = (index + 1) % Selectables.Count; - var navigation = Selectables[upIndex].navigation; - navigation.selectOnDown = Selectables[downIndex]; - Selectables[upIndex].navigation = navigation; - navigation = Selectables[downIndex].navigation; - navigation.selectOnUp = Selectables[upIndex]; - Selectables[downIndex].navigation = navigation; - if (downIndex == 0) - { - Selectables[upIndex].Select(); - } - else - { - Selectables[downIndex].Select(); - } - - Selectables.RemoveAt(index); - } - protected virtual void AddSelectable(Selectable selectable, int index) { Selectables.Insert(index, selectable); diff --git a/src/OWML.ModHelper.Menus/ModTabMenu.cs b/src/OWML.ModHelper.Menus/ModTabMenu.cs index a51e1ce35..e58c65f70 100644 --- a/src/OWML.ModHelper.Menus/ModTabMenu.cs +++ b/src/OWML.ModHelper.Menus/ModTabMenu.cs @@ -33,13 +33,6 @@ public void Initialize(TabButton tabButton) InvokeOnInit(); } - public override void SelectFirst() - { - //var firstSelectable = Menu.GetComponentInChildren(); - //Locator.GetMenuInputModule().SelectOnNextUpdate(firstSelectable); - //Menu.SetSelectOnActivate(firstSelectable); - } - public override void Open() { if (!_optionsMenu.IsOpen)