use full window canvas and try to use the real size in pixel...

This commit is contained in:
Hannes Janetzek
2013-06-30 08:49:06 +02:00
parent c002b8a3c3
commit 099ab0e817
4 changed files with 537 additions and 183 deletions

View File

@@ -1,15 +1,19 @@
package org.oscim.gdx.client;
// -draftCompile -localWorkers 2
import org.oscim.core.Tile;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.gwt.GwtApplication;
import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration;
import com.badlogic.gdx.backends.gwt.GwtGraphics;
public class GwtLauncher extends GwtApplication {
@Override
public GwtApplicationConfiguration getConfig () {
GwtApplicationConfiguration cfg = new GwtApplicationConfiguration(1400, 800);
public GwtApplicationConfiguration getConfig() {
GwtApplicationConfiguration cfg = new GwtApplicationConfiguration(GwtGraphics.getWindowWidthJSNI(),
GwtGraphics.getWindowHeightJSNI() );
cfg.stencil = true;
cfg.fps = 25;
@@ -17,8 +21,12 @@ public class GwtLauncher extends GwtApplication {
}
@Override
public ApplicationListener getApplicationListener () {
public ApplicationListener getApplicationListener() {
if (GwtGraphics.getDevicePixelRatioJSNI() > 1)
Tile.SIZE = 400;
else
Tile.SIZE = 360;
return new GwtGdxMap();
}
}
}