Wiki Navigation
- Loading...
Question
How do I create a new element?
Answer
You can dynamically create and render new elements and then access them as if they were in the XML-file.
public override void AllocResources() { base.AllocResources(); mylabel = new GUILabelControl(5678, 999, 300, 400, 200, 100, string.Empty, "This is a new string to render in a label", 0xFFFFFFFF, GUIControl.Alignment.Left, false); mylabel.AllocResources(); } public override void Render(float timePassed) { base.Render(timePassed); mylabel.Render(timePassed); }
This page has no comments.