Bad window title when

Hi,

I’m using a Main class extending LegacyApplication (it’s an old project I upgraded to jme3.1) and when showing the settings dialog having the second parameter (loadFromRegistry) as true it ignores all the passed settings specially the title which shows the default name instead.

This is the snipet:

settings.setTitle("My title");
setSettings(settings);

//Second parameter set as false, it makes sometimes the app to run with bad name (default name)
if (!JmeSystem.showSettingsDialog(settings, false)) {
    return;
}

This was not happening in previous releases.

I don’t know if something was changed in jme3.1 or it may be a bug…

Thanks

For what it’s worth, this is my basic pattern for starting an application:

        Main main = new Main();
        
        AppSettings settings = new AppSettings(true);
 
        // Set some defaults that will get overwritten if
        // there were previously saved settings from the last time the user
        // ran.       
        settings.setWidth(1280);
        settings.setHeight(720);
        settings.setVSync(true);
        
        settings.load(GameConstants.GAME_NAME);
        settings.setTitle(GameConstants.GAME_NAME);
        settings.setSettingsDialogImage("/anarchy-splash-512.png");
        settings.setUseJoysticks(true);
        /*
        ....if I have app icons
        try {
            BufferedImage[] icons = new BufferedImage[] {
                    ImageIO.read( Main.class.getResource( "/-icon-128.png" ) ),
                    ImageIO.read( Main.class.getResource( "/-icon-32.png" ) ),
                    ImageIO.read( Main.class.getResource( "/-icon-16.png" ) )
                };
            settings.setIcons(icons);
        } catch( IOException e ) {
            log.warn( "Error loading globe icons", e );
        }*/        
        
        main.setSettings(settings);        
        main.start();

Why are you calling showSettingsDialog() manually? I’ve never done that before.

I’m calling it manually because instead of using SimpleApplication I had to extend LegacyApplication to properly implement what I needed. It’s old code I’m updating to jme3.1 it was running on jme3 beta2 before… :stuck_out_tongue:

o_O