/// <summary> /// Create a new interface with a specific icon /// </summary> /// <param Name="icon"></param> protected AbstractInterface(PImage icon) { //Create the icon Icon = icon; Icon.Bounds = new RectangleF(MinWidth + Padding, Padding, IconBounds.Width, IconBounds.Height); AddChild(Icon); //Create the background Background = PPath.CreateRectangle(0, 0, MinWidth + IconBounds.Width + (Padding * 2), 100); AddChild(Background); //Create the text entry field Entry = new PText(); Entry.ConstrainHeightToTextHeight = false; Entry.Bounds = new RectangleF(Padding, Padding, 0, TextHeight); Entry.Font = new Font("Century Gothic", 32); AddChild(Entry); //Create the text entry handler Handler = new InterfaceTextEntryHandler(this); Entry.AddInputEventListener(Handler); }