Exemplo n.º 1
0
        private void ContinueResponse(object sender, MenuDialogItemEventArgs e)
        {
            MenuDialogEventArgs eventArgs = new MenuDialogEventArgs();

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

            OnEnded(eventArgs);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public virtual void OnSelected(MenuDialogItemEventArgs e)
 {
     Selected?.Invoke(this, e);
 }