Hi all,
i have a severe beginners problem. I created a little app, with Nifty GUI.
The panels (created via an xml file) should allow basic change of camera
position (in the update loop). I used a controller in the Nifty XML file (controller=“mygame.GUI”), with “interact onClick (e.g )”.
For my camera-changing varaible, I have an integer defined as protected in my main method.
A separate java class (within “mygame” / the package) has the screen controller and should change the variable, but it doesnt work (save putting out the strings to the console).
The class is:
public class GUI extends TestNiftyGui implements ScreenController {
@Override
public void bind(Nifty nifty, Screen screen) {
}
@Override
public void onStartScreen() {
}
@Override
public void onEndScreen() {
}
public void buttona() {
System.out.println(“AAAAAAAAAAA”);
funk=1;
}
public void buttonb() {
System.out.println(“BBBBBBBBBBBBBBB”);
funk=2;
}
public void buttonc() {
System.out.println("CCCCCCCCCCCCCCC");
funk=3;
}
}
Would be great if you could give any help!!