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); }
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(); }
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); } } }