I’ve been meddling with this for a while, and it seems like I’m missing something basic, but I’m not having any luck figuring it out.
I’ve got some simple along the lines of:
[java]Panel panel = new Panel(screen, UIDUtil.getUID(), Vector2f.ZERO, new Vector2f(200, 200));
hudLayer.addChild(panel);
ButtonAdapter button = new ButtonAdapter(screen, UIDUtil.getUID(), new Vector2f(15, 15), new Vector2f(100, 25));
button.setText(“testing”);
panel.addChild(button);
Label label = new Label(screen, UIDUtil.getUID(), new Vector2f(10, 10f), new Vector2f(100, 100));
label.setText(“First Text”);
label.setFontColor(ColorRGBA.White);
hudLayer.addChild(label);[/java]
Which shows up on the screen like so:
Obviously, the text is messed up, but the panel rendered correctly.
But when I mouse over or click on the button, the text fixes itself:
What am I forgetting to do to get the text to render correctly from the start?