diff --git a/src/ShipInventoryUpdated/Dependencies/InteractiveTerminalAPI/ShipApplication.cs b/src/ShipInventoryUpdated/Dependencies/InteractiveTerminalAPI/ShipApplication.cs index 1c12a94..c3b59c5 100644 --- a/src/ShipInventoryUpdated/Dependencies/InteractiveTerminalAPI/ShipApplication.cs +++ b/src/ShipInventoryUpdated/Dependencies/InteractiveTerminalAPI/ShipApplication.cs @@ -12,7 +12,7 @@ namespace ShipInventoryUpdated.Dependencies.InteractiveTerminalAPI; -public class ShipApplication : PageApplication +public class ShipApplication : PageApplication { #region Application @@ -95,7 +95,7 @@ Action action var entriesPerPage = GetEntriesPerPage([]); var cursorCount = items.Length; - (T[][] pageGroups, CursorMenu[] cursorMenus, IScreen[] screens) = GetPageEntries(items); + (T[][] pageGroups, BaseCursorMenu[] cursorMenus, IScreen[] screens) = GetPageEntries(items); for (var i = 0; i < pageGroups.Length; i++) { @@ -132,7 +132,7 @@ Action action }; } - cursorMenus[i] = new CursorMenu + cursorMenus[i] = new CursorMenu { cursorIndex = 0, elements = elements @@ -155,7 +155,7 @@ Action action // Set the current page's cursor cursorMenus[currentPageIndex].cursorIndex = currentCursorIndex; - currentPage = PageCursorElement.Create(currentPageIndex, screens, cursorMenus); + currentPage = PageCursorElement.Create(currentPageIndex, screens, cursorMenus); currentCursorMenu = currentPage.GetCurrentCursorMenu(); currentScreen = currentPage.GetCurrentScreen(); @@ -168,7 +168,7 @@ Action action private void LockedScreen() { - var optionMenu = new CursorMenu + var optionMenu = new CursorMenu { cursorIndex = 0, elements = @@ -197,7 +197,7 @@ private void LockedScreen() optionMenu ] ); - currentPage = PageCursorElement.Create(0, [screen], [optionMenu]); + currentPage = PageCursorElement.Create(0, [screen], [optionMenu]); SwitchScreen(screen, optionMenu, true); } @@ -218,7 +218,7 @@ private void MainScreen() InfoCursorElement() }; - var optionMenu = new CursorMenu + var optionMenu = new CursorMenu { cursorIndex = Inventory.Count > 0 ? 0 : elements.Length - 1, elements = elements @@ -238,7 +238,7 @@ private void MainScreen() optionMenu ] ); - currentPage = PageCursorElement.Create(0, [screen], [optionMenu]); + currentPage = PageCursorElement.Create(0, [screen], [optionMenu]); SwitchScreen(screen, optionMenu, true); } @@ -263,7 +263,7 @@ private void ConfirmElement(string message, Action? confirmCallback, Action? dec // Elements var automaticPositive = Configuration.Instance?.Terminal.AutomaticPositiveAnswer.Value ?? false; - var optionMenu = new CursorMenu + var optionMenu = new CursorMenu { cursorIndex = automaticPositive ? 1 : 0, elements = @@ -300,7 +300,7 @@ private void ConfirmElement(string message, Action? confirmCallback, Action? dec ] ); - currentPage = PageCursorElement.Create(0, [screen], [optionMenu]); + currentPage = PageCursorElement.Create(0, [screen], [optionMenu]); SwitchScreen(screen, optionMenu, true); RegisterExitAction(_ => _confirmExitCallback?.Invoke()); @@ -499,7 +499,7 @@ private void GetInfo() var items = Inventory.Items; - var options = new CursorMenu + var options = new CursorMenu { cursorIndex = 0, elements = [] @@ -521,7 +521,7 @@ private void GetInfo() ] ); - currentPage = PageCursorElement.Create(0, [screen], [options]); + currentPage = PageCursorElement.Create(0, [screen], [options]); SwitchScreen(screen, options, true); RegisterExitAction(_ => MainScreen()); diff --git a/src/ShipInventoryUpdated/ShipInventoryUpdated.cs b/src/ShipInventoryUpdated/ShipInventoryUpdated.cs index 6acf4bb..6048503 100644 --- a/src/ShipInventoryUpdated/ShipInventoryUpdated.cs +++ b/src/ShipInventoryUpdated/ShipInventoryUpdated.cs @@ -9,7 +9,7 @@ namespace ShipInventoryUpdated; [BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)] // Hard -[BepInDependency("WhiteSpike.InteractiveTerminalAPI")] +[BepInDependency("WhiteSpike.InteractiveTerminalAPI", "1.3.0")] [BepInDependency(LethalLib.Plugin.ModGUID)] // Soft [BepInDependency(LethalConfig.PluginInfo.Guid, BepInDependency.DependencyFlags.SoftDependency)] diff --git a/src/ShipInventoryUpdated/ShipInventoryUpdated.csproj b/src/ShipInventoryUpdated/ShipInventoryUpdated.csproj index f6ec560..698c7f1 100644 --- a/src/ShipInventoryUpdated/ShipInventoryUpdated.csproj +++ b/src/ShipInventoryUpdated/ShipInventoryUpdated.csproj @@ -31,7 +31,7 @@