diff --git a/MenuAPI/Menu.cs b/MenuAPI/Menu.cs index 0dc87e3..eaa1d43 100644 --- a/MenuAPI/Menu.cs +++ b/MenuAPI/Menu.cs @@ -813,6 +813,16 @@ public void GoLeft() DynamicListItemCurrentItemChanged(this, dynList, oldValue, newSelectedItem); PlaySoundFrontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", false); } + // If it's a checkbox, just trigger the box instead. + else if (item.Enabled && item is MenuCheckboxItem checkbox) + { + SelectItem(checkbox); + } + // If the item is enabled and it's not any of the above, just select it. + else if (item.Enabled) + { + SelectItem(item); + } } } @@ -864,6 +874,16 @@ public void GoRight() DynamicListItemCurrentItemChanged(this, dynList, oldValue, newSelectedItem); PlaySoundFrontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", false); } + // If it's a checkbox, just trigger the box instead. + else if (item.Enabled && item is MenuCheckboxItem checkbox) + { + SelectItem(checkbox); + } + // If the item is enabled and it's not any of the above, just select it. + else if (item.Enabled) + { + SelectItem(item); + } } } diff --git a/MenuAPI/MenuController.cs b/MenuAPI/MenuController.cs index bf45594..6bb173a 100644 --- a/MenuAPI/MenuController.cs +++ b/MenuAPI/MenuController.cs @@ -197,7 +197,12 @@ private async Task ProcessMainButtons() if (currentMenu.Visible && AreMenuButtonsEnabled) { // Select / Enter - if (Game.IsDisabledControlJustReleased(0, Control.FrontendAccept) || Game.IsControlJustReleased(0, Control.FrontendAccept) || (Game.IsDisabledControlJustReleased(0, Control.VehicleMouseControlOverride) || Game.IsControlJustReleased(0, Control.VehicleMouseControlOverride))) + if ( + Game.IsDisabledControlJustReleased(0, Control.FrontendAccept) || + Game.IsControlJustReleased(0, Control.FrontendAccept) || + Game.IsDisabledControlJustReleased(0, Control.VehicleMouseControlOverride) || + Game.IsControlJustReleased(0, Control.VehicleMouseControlOverride) + ) { if (currentMenu.Size > 0) { @@ -709,7 +714,7 @@ internal static async Task DrawInstructionalButtons() EndScaleformMovieMethod(); - + for (int i = 0; i < menu.InstructionalButtons.Count; i++) {