This whole area seems quite clunky with nifty.
For buttons I didn’t use the controls at all, I just use normal panels and set the images/styles/etc on them appropriately.
I also have a java method to construct one of those using builders and just use that method whenever I need a button.
i.e. [java]PanelBuilder buildButton(String name, etc)[/java]
For example:
[java]
<style id=“buttonBase”>
<attributes paddingLeft=“5px” paddingRight=“5px” margin=“6px” imageMode=“resize:10,6,10,10,10,6,10,6,10,6,10,10” childLayout=“horizontal”/>
<effect>
<onHover name=“colorBar” color="#ccc8"/>
<onCustom name=“colorPulsate” customKey=“pulsate” startColor="#f88f" endColor="#fddf"
pulsateType=“sin” period=“2000” cycle=“true” neverStopRendering=“true”/>
</effect>
</style>
<style id=“buttonGrey” base=“buttonBase”>
<attributes backgroundImage=“Interface/buttonGrey.png” visibleToMouse=“true”/>
<effect>
<onClick name=“changeImage” active=“Interface/buttonGreyDown.png”
inactive=“Interface/buttonGrey.png”
imageMode=“resize:10,6,10,10,10,6,10,6,10,6,10,10” length=“250” />
</effect>
</style>
<style id=“buttonGreen” base=“buttonBase”>
<attributes backgroundImage=“Interface/buttonGreen.png” visibleToMouse=“true”/>
<effect>
<onClick name=“changeImage” active=“Interface/buttonGreenDown.png”
inactive=“Interface/buttonGreen.png”
imageMode=“resize:10,6,10,10,10,6,10,6,10,6,10,10” length=“250” />
</effect>
</style>
[/java]
Then to use it:
[java] <panel id=“chat” style=“buttonGrey” height=“32px”>
<interact onClick=“chatClicked()” />
<text style=“buttonText” text="${t9n.player.chat}"/>
</panel>
[/java]