public TextInputDialog(IScreen screen, DisplayLayer drawOrder, string title, string text, string inputText)
: base(screen, drawOrder, title)
{
textItem = new TextItem (screen, drawOrder, String.Empty);
Cancel = (time) => {
Close (time);
};
Submit = (time) => {
Close (time);
};
Bounds.Size = new ScreenPoint (screen, 0.5f, 0.3f);
// Der Titel-Text ist mittig ausgerichtet
AlignX = HorizontalAlignment.Center;
menu = new Menu (Screen, Index + DisplayLayer.Menu);
menu.Bounds = ContentBounds;
menu.Bounds.Padding = new ScreenPoint (screen, 0.010f, 0.019f);
menu.ItemAlignX = HorizontalAlignment.Left;
menu.ItemAlignY = VerticalAlignment.Center;
//die Texteingabe
textInput = new InputItem (Screen, Index + DisplayLayer.MenuItem, text, inputText);
menu.Add (textInput);
menu.Add (textItem);
textInput.IsEnabled = true;
textInput.IsInputEnabled = true;
textInput.NameWidth = 0.35f;
textInput.ValueWidth = 0.65f;
ValidKeys.AddRange (new Keys[] { Keys.Enter, Keys.Escape });
}