Package com.jme3.system

Examples of com.jme3.system.AppSettings


    }

    @Override
    public void start() {
     
        setSettings(new AppSettings(true));
        PolluxSettingsDialog.show(settings);
       
        super.start();
    }
View Full Code Here


    public static void main(String[] args) {

        GameNameGoesHere app = new GameNameGoesHere();

        // load the application settings
        AppSettings appSettings = new AppSettings(true);
        appSettings.setVSync(true);
        appSettings.setTitle("Time to Grow up!");
        appSettings.setFullscreen(true);

        try {
            appSettings.setIcons(new BufferedImage[]{ImageIO.read(new File("assets/Interface/icon.png"))});
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "Icon missing.", ex);
        }

        // set the start image
        appSettings.setSettingsDialogImage("Interface/splash_screen.png");

        // apply the settings
        app.setSettings(appSettings);

        // starts the application (GameNameGoesHere)
View Full Code Here

    public static Applet getApplet(Application app){
        return appToApplet.get(app);
    }

    private void createCanvas(){
        AppSettings settings = new AppSettings(true);

        // load app cfg
        if (appCfg != null){
            InputStream in = null;
            try {
                in = appCfg.openStream();
                settings.load(in);
                in.close();
            } catch (IOException ex){
                // Called before application has been created ....
                // Display error message through AWT
                JOptionPane.showMessageDialog(this, "An error has occured while "
                                                  + "loading applet configuration"
                                                  + ex.getMessage(),
                                              "jME3 Applet",
                                              JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            } finally {
                if (in != null)
                    try {
                    in.close();
                } catch (IOException ex) {
                }
            }
        }

        if (assetCfg != null){
            settings.putString("AssetConfigURL", assetCfg.toString());
        }

        settings.setWidth(getWidth());
        settings.setHeight(getHeight());

        JmeSystem.setLowPermissions(true);

        try{
            Class<? extends Application> clazz = (Class<? extends Application>) Class.forName(appClass);
View Full Code Here

    public void start() {
        // set some default settings in-case
        // settings dialog is not shown
        boolean loadSettings = false;
        if (settings == null) {
            setSettings(new AppSettings(true));
            loadSettings = true;
        }

        // show settings dialog
        if (showSettings) {
View Full Code Here

        //setModal(true);
        setAlwaysOnTop(true);
        setResizable(false);

        AppSettings registrySettings = new AppSettings(true);

        String appTitle;
        if(source.getTitle()!=null){
            appTitle = source.getTitle();
        }else{
           appTitle = registrySettings.getTitle();
        }
       
        minWidth = source.getMinWidth();
        minHeight = source.getMinHeight();
       
        try {
            registrySettings.load(appTitle);
        } catch (BackingStoreException ex) {
            logger.log(Level.WARNING,
                    "Failed to load settings", ex);
        }

        if (loadSettings) {
            source.copyFrom(registrySettings);
        } else if(!registrySettings.isEmpty()) {
            source.mergeFrom(registrySettings);
        }

        GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
View Full Code Here

  private RigidBodyControl vehicleControl;
  private Player player;
  private ChaseCamera chaseCam;

  public BaseGame() {
    AppSettings settings = new AppSettings(true);
    settings.setFullscreen(false);
    settings.setResolution(1024, 800);
    setSettings(settings);
    setShowSettings(false);
  }
View Full Code Here

    app.start();
  }

  public HelloCollision() {
    super();
    AppSettings sets = new AppSettings(true);
    sets.setFullscreen(false);
    sets.setResolution(1024, 768);
    setSettings(sets);
    setShowSettings(false);

    long ticksPerMillisecond = timer.getResolution() / 1000;
    inputDelay = ticksPerMillisecond * 100;
 
View Full Code Here

  private ScreenRecorder screenRecorder;
 
  public TestAI()
  {
    super();
    AppSettings sets = new AppSettings(true);
    sets.setFullscreen(false);
    sets.setResolution(1024, 768);
    setSettings(sets);
    setShowSettings(false);
  }
View Full Code Here

public class TestJoystick extends SimpleApplication implements AnalogListener {

    public static void main(String[] args){
        TestJoystick app = new TestJoystick();
        AppSettings settings = new AppSettings(true);
        settings.setUseJoysticks(true);
        app.setSettings(settings);
        app.start();
    }
View Full Code Here

    // JMonkey-Loglevel auf INFO+1
    Logger.getLogger("").setLevel(Level.SEVERE);

    SerializerRegistrationInitializer.registerClasses();

    AppSettings settings = new AppSettings(true);

    boolean fullscreen = ResourceConstants
        .getBoolProp(ResourceConstants.CLIENT_FULLSCREEN);
    int width, height;
    if (fullscreen) {
      settings.setFullscreen(fullscreen);
      Dimension resolution = Toolkit.getDefaultToolkit().getScreenSize();
      width = resolution.width;
      height = resolution.height;
    } else {
      width = ResourceConstants
          .getIntProp(ResourceConstants.CLIENT_RESOLUTION_WIDTH);
      height = ResourceConstants
          .getIntProp(ResourceConstants.CLIENT_RESOLUTION_HEIGHT);
    }

    settings.setResolution(width, height);

    GameApplication gameApp = new GameApplication(settings, false);
    gameApp.setInitCallback(getInitCallback(gameApp));
    gameApp.start();
  }
View Full Code Here

TOP

Related Classes of com.jme3.system.AppSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.