”missing font in renderText!”

Hi!



With the following XML:



[xml]

<?xml version=“1.0” encoding=“UTF-8”?>

<nifty xmlns=“http://nifty-gui.sourceforge.net/nifty.xsd” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://nifty-gui.sourceforge.net/nifty.xsd http://nifty-gui.sourceforge.net/nifty.xsd”>

<useControls filename=“nifty-default-controls.xml”/>

<screen id=“start” controller=“game.user_interface$reify__1228”>

<layer id=“layer1” backgroundColor="#00000000" childLayout=“center” width=“50” height=“50”>

<panel height=“10%” width=“20%” align=“center” valign=“center” backgroundColor="#f60f" childLayout=“center”>

<control width=“50%” name=“button” childLayout=“vertical” align=“center” label=“Hello” font=“Interface/Fonts/Default.fnt” valign=“center” id=“helloButton” height=“20%”>

<interact onClick=“sayHello”/>

</control>

</panel>

</layer>

</screen>

</nifty>

[/xml]



I get this warning:



[java]WARNING: missing font in renderText! could it be that you’re using <text>

elements without a font or style attribute? in case you’ve replaced

<label> with <text> you’re probably missing

style=‘nifty-label’ :)[/java]



…and no button. I don’t understand the error message, since the only thing with text, the button, has a font.

fixed with direct irc chat support for tufflax:


[22:28:50] void256 you need to include the style file
[22:29:06] void256 <useStyles filename="nifty-default-styles.xml" />


;)