예제 #1
0
        private int GetSelected(Key key, int max)
        {
            if (menuAction is PartySelectAction)
            {
                return(menuAction.GetDirection(key, max));
            }
            else if (menuAction is PartySwitchCharacterAction)
            {
                return(menuAction.GetDirection(key, max, 1));
            }

            return(-1);
        }
예제 #2
0
        private void MenuKeyDown(object sender, KeyEventArgs e)
        {
            var max      = SetMax();
            var selected = menuAction.GetDirection(e.Key, max);

            if (selected > -1)
            {
                MenuSelect(selected);
            }
            else if (selected == -1)
            {
                Debug.WriteLine("E2101");
            }
            else
            {
                MenuConfirm(selected);
            }

            txtBlkInformation.Text = menuAction.CurrentIndex.ToString();
        }
예제 #3
0
 private void MenuKeyDown(object sender, KeyEventArgs e)
 {
     if (menuAction != null)
     {
         var max      = SetMax(e.Key);
         var selected = menuAction.GetDirection(e.Key, max);
         if (selected > -1)
         {
             MenuSelect(selected, e.Key);
         }
         else if (selected == -1)
         {
             Debug.WriteLine("E");
         }
         else if (selected < -1)
         {
             MenuConfirm(selected);
         }
     }
 }