(copy-pasted from an invalid bug filed against v2 on github):
Code looks like this:
public virtual void Render(UserInterfaceRenderer renderer, Element element, int x, int y, int width, int height) {
Color4 color = new Color4(1.0f, 1.0f, 1.0f);
renderer.RenderRectangle(x, y, width, height, color);
renderer.RenderString(element.Label, 0, 0, new Color4(1.0f, 0.0f, 0.0f));
}
Should look like this:
public virtual void Render(UserInterfaceRenderer renderer, Element element, int x, int y, int width, int height) {
Color4 color = new Color4(1.0f, 1.0f, 1.0f);
renderer.RenderRectangle(x, y, width, height, color);
renderer.RenderString(element.Label, x, y, new Color4(1.0f, 0.0f, 0.0f)); // note change fro 0,0 to x,y
}
The result of the bug is that when you add more than one element to be
registered, the boxes draw correctly, but the text steps on itself.
Thanks
Original issue reported on code.google.com by josh.petrie on 17 Sep 2011 at 7:06
Original issue reported on code.google.com by
josh.petrie
on 17 Sep 2011 at 7:06