Search in sources :

Example 46 with AppSettings

use of com.jme3.system.AppSettings in project TeachingInSimulation by ScOrPiOzzy.

the class JmeApplication method getAppSetting.

public AppSettings getAppSetting() {
    Preferences prefs = Preferences.userRoot().node(SettingConsts.REG_APP_PATH);
    AppSettings settings = new AppSettings(true);
    // 分辨率
    int width = prefs.getInt(SettingConsts.RESOLUTION_WIDTH, 1366);
    int height = prefs.getInt(SettingConsts.RESOLUTION_HEIGHT, 768);
    settings.setResolution(width, height);
    settings.setFullscreen(prefs.getBoolean(SettingConsts.SCREEN_MODE, false));
    return settings;
}
Also used : AppSettings(com.jme3.system.AppSettings) Preferences(java.util.prefs.Preferences)

Aggregations

AppSettings (com.jme3.system.AppSettings)40 LegacyApplication (com.jme3.app.LegacyApplication)5 IOException (java.io.IOException)4 AL (com.jme3.audio.openal.AL)3 ALAudioRenderer (com.jme3.audio.openal.ALAudioRenderer)3 ALC (com.jme3.audio.openal.ALC)3 EFX (com.jme3.audio.openal.EFX)2 MouseInput (com.jme3.input.MouseInput)2 Vector2f (com.jme3.math.Vector2f)2 Mesh (com.jme3.scene.Mesh)2 JmeToJFXApplication (com.jme3x.jfx.injfx.JmeToJFXApplication)2 GraphicsDevice (java.awt.GraphicsDevice)2 BufferedReader (java.io.BufferedReader)2 File (java.io.File)2 InputStream (java.io.InputStream)2 TextView (android.widget.TextView)1 JmeUtil (com.cas.sim.tis.util.JmeUtil)1 SettingsDialog (com.jme3.app.SettingsDialog)1 SelectionListener (com.jme3.app.SettingsDialog.SelectionListener)1 AssetNotFoundException (com.jme3.asset.AssetNotFoundException)1