use full window canvas and try to use the real size in pixel...
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user