Beispiel #1
0
        private void ContinueResponse(object sender, MenuDialogItemEventArgs e)
        {
            MenuDialogEventArgs eventArgs = new MenuDialogEventArgs();

            eventArgs.Button = DialogButton.Left;
            eventArgs.Data   = itemsData;

            OnEnded(eventArgs);
        }
Beispiel #2
0
        private void MenuResponse(object sender, DialogResponseEventArgs e)
        {
            if (e.DialogButton == DialogButton.Right)
            {
                MenuDialogEventArgs eventArgs = new MenuDialogEventArgs();
                eventArgs.Data   = itemsData;
                eventArgs.Button = DialogButton.Right;
                OnEnded(eventArgs);
                return;
            }

            if (e.ListItem <= menuItems.Count)
            {
                MenuDialogItemEventArgs eventArgs = new MenuDialogItemEventArgs();
                eventArgs.Parent     = this;
                eventArgs.ParentData = itemsData;
                eventArgs.Player     = e.Player;
                menuItems[e.ListItem].OnSelected(eventArgs);
                return;
            }

            this.Show(e.Player);
        }
Beispiel #3
0
 public virtual void OnEnded(MenuDialogEventArgs e)
 {
     Ended?.Invoke(this, e);
 }