Why don't Nifty-Gui's buttons respond to the mouse?

bigs15

New Member
I have defined my controller in the tag :\[code\]<screen id="start" controller="screen.ViewController">\[/code\]View Controler :\[code\]public class ViewController implements ScreenController{ @Override public void bind(Nifty nifty, Screen screen){} @Override public void onStartScreen(){} @Override public void onEndScreen(){} public void start(Nifty nifty){} public static void onClick() { System.out.println("Clicked!"); }}\[/code\]And I've created my button in an XML file under the tag, defined the interact and defined in my ViewController :\[code\]<control name="button" label="Button"/><interact onClick="onClick()"/>\[/code\]The button is rendered with the correct picture and text, however, it doesn't respond to user input. Do I need to forward Keyboard/Mouse events to Nifty? Or is there something else I'm missing?EDITAll I was missing was the nifty.update(); in my render loop :D
 
Back
Top