Nifty custom control

hi i am following nifty tutorials and cant get the simplest example of custom control to work.

The tutorial has this code :


<?xml version="1.0" encoding="UTF-8"?>


<controlDefinition style="nifty-button" name="button">

<panel style="#panel" focusable="true">

<text id="#text" style="#text" text="$label"/>





  1. Can anyone post the simplest (as simple as it can be) control that works, because this code doesnt work. It makes nifty fatally crash silently without any warning or exception and replaces gui with a black screen when i import it :

    [xml]<useControl filename="Interface/nifty/controls/control.xml" />[/xml]

    It may be that it doesnt find something that it searches ?

    Thank you

[xml]<?xml version="1.0" encoding="UTF-8"?>


<controlDefinition name="simple">

<panel childLayout="center" width="100%" padding="20px">

<text font="aurulent-sans-16.fnt" color="#000f" text="TRALALA" align="center" valign="center"/>



<screen id="start" controller="de.lessvoid.nifty.examples.helloworld.HelloWorldStartScreen">

<layer childLayout="vertical">

<control name="simple" backgroundColor="#f00f" />

<control name="simple" backgroundColor="#f70f" />

<control name="simple" backgroundColor="#087f" />




1 Like

nice thank you it works !!!