Re-run libGDX setup and replace project files with those
This commit is contained in:
parent
ece481061e
commit
9c6be35369
30 changed files with 653 additions and 323 deletions
12
html/src/dev/lonami/klooni/GdxDefinition.gwt.xml
Normal file
12
html/src/dev/lonami/klooni/GdxDefinition.gwt.xml
Normal 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>
|
13
html/src/dev/lonami/klooni/GdxDefinitionSuperdev.gwt.xml
Normal file
13
html/src/dev/lonami/klooni/GdxDefinitionSuperdev.gwt.xml
Normal 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>
|
51
html/src/dev/lonami/klooni/client/HtmlLauncher.java
Normal file
51
html/src/dev/lonami/klooni/client/HtmlLauncher.java
Normal 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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue