public GUIStaticText AddStaticText(string text, Rect rectangle, bool border, bool wordWrap, GUIElement parent, int id, bool fillBackground) { IntPtr par = (parent == null ? IntPtr.Zero : parent.Raw); return (GUIStaticText)NativeElement.GetObject(GuiEnv_AddStaticText(_raw, text, rectangle.ToUnmanaged(), border, wordWrap, par, id, fillBackground), typeof(GUIStaticText)); }
public CustomElement(GUIEnvironment guienv, GUIElement parent, int id, Rect rect) : base(guienv, parent, id, rect) { driver = guienv.VideoDriver; // For some reason passing this as a parent parameter doesn't work. // Probably that's because initialization of the managed part // is not finished yet, so this points to elsewhere but a complete class text = guienv.AddStaticText(caption, rect, false, true, null, -1, false); // let's workaround this by calling addchild instantly AddChild(text); }