using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; using UnityEngine.U2D.Animation; namespace UnityEditor.U2D.Animation.SpriteLibraryEditor { /// /// Events triggerred from the controller class to notify different UI elements about changes. /// internal class ControllerEvents { /// /// Category list changed. Boolean is true when the provided list is filtered. /// public UnityEvent, bool> onModifiedCategories { get; } = new(); /// /// Label list changed. Boolean is true when the provided list is filtered. /// public UnityEvent, bool> onModifiedLabels { get; } = new(); /// /// New Sprite Library Asset has been selected in the Project folder. /// public UnityEvent onSelectedLibrary { get; } = new(); /// /// List of selected category names. /// public UnityEvent> onSelectedCategories { get; } = new(); /// /// List of selected label names. /// public UnityEvent> onSelectedLabels { get; } = new(); /// /// View parameters have changed. /// public UnityEvent onViewChanged { get; } = new(); /// /// Main Library is set. /// public UnityEvent onMainLibraryChanged { get; } = new(); /// /// Library data has been modified. /// public UnityEvent onLibraryDataChanged { get; } = new(); } /// /// Events that notify controller of changes in the UI. /// internal class ViewEvents { /// /// Triggerred to create a new Sprite Library Asset at given location. /// public UnityEvent onCreateNewSpriteLibraryAsset { get; } = new(); /// /// Main UI Split Pane View size changed. /// public UnityEvent onMainUISplitPaneSizeChanged { get; } = new(); /// /// On triggerred Save action. /// public UnityEvent onSave { get; } = new(); /// /// On triggerred Revert action. /// public UnityEvent onRevert { get; } = new(); /// /// Auto-save has changed. /// public UnityEvent onToggleAutoSave { get; } = new(); /// /// View size slider value changed. /// public UnityEvent onViewSizeUpdate { get; } = new(); /// /// View type changed. /// public UnityEvent onViewTypeUpdate { get; } = new(); /// /// Triggerred on filter string changed. /// public UnityEvent onSelectedFilter { get; } = new(); /// /// Triggerred on selected filter type. /// public UnityEvent onSelectedFilterType { get; } = new(); /// /// Triggerred when Main Library Asset is set. /// public UnityEvent onSetMainAsset { get; } = new(); /// /// Triggerred on new Categories selected. /// public UnityEvent> onSelectCategories { get; } = new(); /// /// Triggerred on new Labels selected. /// public UnityEvent> onSelectLabels { get; } = new(); /// /// Create new Category. /// public UnityEvent> onCreateNewCategory { get; } = new(); /// /// Rename selected Category. /// public UnityEvent onRenameCategory { get; } = new(); /// /// Triggerred when Categories are reordered in the list. /// public UnityEvent> onReorderCategories { get; } = new(); /// /// Triggerred when selected categories are to be deleted. /// public UnityEvent onDeleteCategories { get; } = new(); /// /// Create a new Label. /// public UnityEvent onCreateNewLabel { get; } = new(); /// /// Rename selected Label. /// public UnityEvent onRenameLabel { get; } = new(); /// /// Triggerred when Labels are reordered in the list. /// public UnityEvent> onReorderLabels { get; } = new(); /// /// Delete selected Labels. /// public UnityEvent onDeleteLabels { get; } = new(); /// /// Set Label's Sprite. /// public UnityEvent onSetLabelSprite { get; } = new(); /// /// Add data to Categories. Triggerred when data is dragged and dropped into Categories. /// public UnityEvent, bool, string> onAddDataToCategories { get; } = new(); /// /// Add data to Labels. Triggerred when data is dragged and dropped into labels. /// public UnityEvent, bool, string> onAddDataToLabels { get; } = new(); /// /// Revert Labels in the collection. /// public UnityEvent> onRevertOverridenLabels { get; } = new(); } }