Skip to content

Commit

Permalink
C# UIMenu added a OnFilteringFailed event called on erroring.
Browse files Browse the repository at this point in the history
  • Loading branch information
manups4e committed Jun 1, 2024
1 parent 5e1692f commit f55217a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ScaleformUI_Csharp/Menus/UIMenu/UIMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ public enum Keys
public delegate void MenuOpenedEvent(UIMenu menu, dynamic data = null);
public delegate void MenuClosedEvent(UIMenu menu);
public delegate void ItemHighlightedEvent(UIMenu menu, UIMenuItem item);
public delegate void MenuFilteringFailedEvent(UIMenu menu);

public enum MenuAnimationType
{
Expand Down Expand Up @@ -1101,6 +1102,7 @@ public ItemFont DescriptionFont

public event MenuOpenedEvent OnMenuOpen;
public event MenuClosedEvent OnMenuClose;
public event MenuFilteringFailedEvent OnFilteringFailed;

/// <summary>
/// Called every time a Stat item changes value
Expand Down Expand Up @@ -2622,6 +2624,7 @@ public void FilterMenuItems(Func<UIMenuItem, bool> predicate)
catch (Exception ex)
{
Debug.WriteLine("^1ScaleformUI - " + ex.ToString());
OnFilteringFailed?.Invoke(this);
}
}

Expand Down

0 comments on commit f55217a

Please sign in to comment.