示例#1
0
        /// <summary>
        /// Creates a new message cell.
        /// </summary>
        private NotificationCell CreateCell()
        {
            var cell = CreateChild <NotificationCell>("cell", ChildCount);

            cell.Anchor     = AnchorType.Top;
            cell.Pivot      = PivotType.Top;
            cell.Width      = this.Width;
            cell.OnDismiss += (c) => {
                // Remove from notifications automatically if hidden.
                OnDismiss?.Invoke(cell.Notification);
                cellRecycler.Return(cell);
                AdjustCellPos();
            };
            return(cell);
        }
        /// <summary>
        /// Event called on key stroke release state.
        /// </summary>
        protected virtual void OnKeyStateRelease(BeatsKey key)
        {
            InvokeKeyRelease(key);

            keyRecycler.Return(key);
        }