[SOLVED]Mouse Cursor No Longer Shows

After the latest update of Jme last night (I use vanilla, not nightly), I have found that two of the settings no longer work.



Is this a problem?


Code:
import com.jme3.app.SimpleApplication; import com.jme3.system.AppSettings;

public class Main extends SimpleApplication {

/**
 * @param args
 */
public static void main(String[] args) {
	AppSettings settings = new AppSettings(true);
	settings.setFullscreen(false);
	settings.setResolution(800, 600);

	Main app = new Main();
	app.setSettings(settings);
	app.start();
}

@Override
public void simpleInitApp() {
	inputManager.setCursorVisible(true); // Problem 1
	
	setShowSettings(false); // Problem 2
	setDisplayFps(false);
	setDisplayStatView(false);
}

}


I labeled them in the code above. What's happening is the mouse is no longer showing up and the Jme3 settings dialog box is still showing even after I had disabled it. Now, I did update to the final jdk7_u6 release. Could this have caused the problems?

I didn't really have this issue til after updating JME and Jdk. Any suggestions guys? Thank you

[java]inputManager.setCursorVisible(true);[/java]



will be overwrote in the initialize function of the new FlyCamAppState(); which executes after simpleInitApp() is called



you can also disable the stats in the new way as well:



https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:intermediate:simpleapplication#defaults_and_customization

1 Like

Adding

Code:
flyCam.setEnabled(false);

fixed the first problem. Thank you.

Now how about the second problem?

Edit:

Sorry. I didn't see the link down below your post. That did the charm. I'm taking it that that is also useful for disabling the menu popup?
1 Like

I solved the second problem. I didn’t put setShowSettings in the right spot.



[java]



import com.jme3.app.SimpleApplication;

import com.jme3.system.AppSettings;



public class Main extends SimpleApplication {



/**

  • @param args

    */

    public static void main(String[] args) {

    AppSettings settings = new AppSettings(true);

    settings.setFullscreen(false);

    settings.setResolution(800, 600);



    Main app = new Main();

    app.setSettings(settings);

    app.setShowSettings(false); // Fixed it here. Forgot that this needs to run before the program is initialized.

    app.start();

    }



    @Override

    public void simpleInitApp() {

    flyCam.setEnabled(false);



    setDisplayFps(false);

    setDisplayStatView(false);

    }



    }[/java]



    Thanks, again, guys.
1 Like
<cite>@draygera said:</cite> I solved the second problem. I didn't put setShowSettings in the right spot.<br /> <br /> <br /> Thanks, again, guys.

Thanks, this helped me solve a problem I had with nifty gui not displaying mouse cursor when the debug info was enabled.

disabling the flycam in main did it.