private ViewModel GetCharacterNameViewModel() { var textInput = new TextInput(Actions.Reload); textInput.Prompt = string.Format("Enter character name:{0}Hit <Escape> to cancel.{0}", Environment.NewLine); textInput.OnInputAccepted = () => { _gameInfo.CharacterName = textInput.Value; _gameInfo.Step = GameCreationStep.ChooseSaveGameSlot; }; var viewModel = ViewModel.CreateWithTextInput<MainMenuViewModel>(textInput); viewModel.Message = "You're gonna need a name. Make it a good one."; viewModel.TitleArt = _asciiArtRepository.GetTitleArt(); return viewModel; }
public TextInputProcessor(TextInput textInput) { _textInput = textInput; }