*
* @throws IOException If an exception occours.
*/
public synchronized void storeSettings() throws IOException {
Wini settingsFile = new Wini();
settingsFile.add( GRAPHICS_SETTINGS_SECTION,
INTEGER_SETTINGS_TYPE.ANTIALIAS.toString(),
"" + this.getNextRunValue( INTEGER_SETTINGS_TYPE.ANTIALIAS ) );
settingsFile.add( GRAPHICS_SETTINGS_SECTION,
INTEGER_SETTINGS_TYPE.OPENGL.toString(),
"" + this.getNextRunValue( INTEGER_SETTINGS_TYPE.OPENGL ) );
settingsFile.add( GRAPHICS_SETTINGS_SECTION,
INTEGER_SETTINGS_TYPE.REDRAW_FPS.toString(),
"" + this.getNextRunValue( INTEGER_SETTINGS_TYPE.REDRAW_FPS ) );
settingsFile.add( CONTROLS_SETTINGS_SECTION,
INTEGER_SETTINGS_TYPE.KEY_LEFT.toString(),
"" + this.getNextRunValue( INTEGER_SETTINGS_TYPE.KEY_LEFT ) );
settingsFile.add( CONTROLS_SETTINGS_SECTION,
INTEGER_SETTINGS_TYPE.KEY_RIGHT.toString(),
"" + this.getNextRunValue( INTEGER_SETTINGS_TYPE.KEY_RIGHT ) );
settingsFile.add( CONTROLS_SETTINGS_SECTION,
INTEGER_SETTINGS_TYPE.KEY_UP.toString(),
"" + this.getNextRunValue( INTEGER_SETTINGS_TYPE.KEY_UP ) );
settingsFile.add( CONTROLS_SETTINGS_SECTION,
INTEGER_SETTINGS_TYPE.KEY_DOWN.toString(),
"" + this.getNextRunValue( INTEGER_SETTINGS_TYPE.KEY_DOWN ) );
settingsFile.add( CONTROLS_SETTINGS_SECTION,
INTEGER_SETTINGS_TYPE.KEY_PAUSE.toString(),
"" + this.getNextRunValue( INTEGER_SETTINGS_TYPE.KEY_PAUSE ) );
settingsFile.add( CONTROLS_SETTINGS_SECTION,
INTEGER_SETTINGS_TYPE.MOVE_MILLIS_TIMEOUT.toString(),
"" + this.getNextRunValue( INTEGER_SETTINGS_TYPE.MOVE_MILLIS_TIMEOUT ) );
settingsFile.add( RESOURCES_SETTINGS_SECTION,
STRING_SETTINGS_TYPE.LEVELS_PATH.toString(),
this. getNextRunValue( STRING_SETTINGS_TYPE.LEVELS_PATH ) );
settingsFile.add( RESOURCES_SETTINGS_SECTION,
STRING_SETTINGS_TYPE.TEXTURES_PATH.toString(),
this.getNextRunValue( STRING_SETTINGS_TYPE.TEXTURES_PATH ) );
File preferencesDirectory = getRelativeDirectory( "." );
settingsFile.store( new File( preferencesDirectory, DEFAULT_CONFIG_FILE ) );
}