public bool EnterAction () { var dialog = new Dialogs.CharacterDialog(dialogTitle); dialog.OnShow += delegate{this.OnShowDialog(dialog);}; dialog.OnExit += delegate{Text = dialog.GetUserInput();this.OnDialogExit(Text);}; dialog.Show(); return false; }
public ItemWithCharacterInput (string subject, string dialogTitle, string startText, Action<string> OnChanged, bool hideInput, bool disableEnter, bool disableNumberAndSymbols){ this.subject = subject; this.Text = startText; this.hide = hideInput; dialog = new Dialogs.CharacterDialog(dialogTitle, disableNumberAndSymbols, disableEnter); dialog.OnExit += delegate { string newText = dialog.GetUserInput(); if(newText != null) { Text = newText; } if(OnChanged != null && newText != null) { OnChanged(Text); } show = false; Parent.RemoveFocus(this); }; }