Skip to content

Commit

Permalink
Merge branch 'dev' into master-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amazingalek authored Oct 12, 2021
2 parents 3b2e1bc + 919e9ad commit 7287822
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 36 deletions.
4 changes: 3 additions & 1 deletion src/OWML.Common/OWML.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="OW.Unity.Dlls" Version="1.1.3" />
<PackageReference Include="OW.Unity.Dlls" Version="1.1.3">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>

</Project>
29 changes: 1 addition & 28 deletions src/OWML.ModHelper.Menus/ModMenuWithSelectables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions src/OWML.ModHelper.Menus/ModTabMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ public void Initialize(TabButton tabButton)
InvokeOnInit();
}

public override void SelectFirst()
{
//var firstSelectable = Menu.GetComponentInChildren<Selectable>();
//Locator.GetMenuInputModule().SelectOnNextUpdate(firstSelectable);
//Menu.SetSelectOnActivate(firstSelectable);
}

public override void Open()
{
if (!_optionsMenu.IsOpen)
Expand Down

0 comments on commit 7287822

Please sign in to comment.