Re-run libGDX setup and replace project files with those

This commit is contained in:
Lonami Exo 2020-03-29 14:46:19 +02:00
parent ece481061e
commit 9c6be35369
30 changed files with 653 additions and 323 deletions

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://www.gwtproject.org/doctype/2.8.0/gwt-module.dtd">
<module rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='Klooni' />
<entry-point class='dev.lonami.klooni.client.HtmlLauncher' />
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
<set-configuration-property name="gdx.assetpath" value="../android/assets" />
<set-property name="user.agent" value="gecko1_8, safari"/>
<collapse-property name="user.agent" values="*" />
</module>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://www.gwtproject.org/doctype/2.8.0/gwt-module.dtd">
<module rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='dev.lonami.klooni.GdxDefinition' />
<collapse-all-properties />
<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
</module>

View file

@ -0,0 +1,51 @@
package dev.lonami.klooni.client;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.gwt.GwtApplication;
import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration;
import dev.lonami.klooni.Klooni;
public class HtmlLauncher extends GwtApplication {
// USE THIS CODE FOR A FIXED SIZE APPLICATION
@Override
public GwtApplicationConfiguration getConfig () {
return new GwtApplicationConfiguration(480, 320);
}
// END CODE FOR FIXED SIZE APPLICATION
// UNCOMMENT THIS CODE FOR A RESIZABLE APPLICATION
// PADDING is to avoid scrolling in iframes, set to 20 if you have problems
// private static final int PADDING = 0;
// private GwtApplicationConfiguration cfg;
//
// @Override
// public GwtApplicationConfiguration getConfig() {
// int w = Window.getClientWidth() - PADDING;
// int h = Window.getClientHeight() - PADDING;
// cfg = new GwtApplicationConfiguration(w, h);
// Window.enableScrolling(false);
// Window.setMargin("0");
// Window.addResizeHandler(new ResizeListener());
// cfg.preferFlash = false;
// return cfg;
// }
//
// class ResizeListener implements ResizeHandler {
// @Override
// public void onResize(ResizeEvent event) {
// int width = event.getWidth() - PADDING;
// int height = event.getHeight() - PADDING;
// getRootPanel().setWidth("" + width + "px");
// getRootPanel().setHeight("" + height + "px");
// getApplicationListener().resize(width, height);
// Gdx.graphics.setWindowedMode(width, height);
// }
// }
// END OF CODE FOR RESIZABLE APPLICATION
@Override
public ApplicationListener createApplicationListener () {
return new Klooni();
}
}