Re-coded everything

This commit is contained in:
Anuken
2017-05-03 00:09:48 -04:00
parent 883610d928
commit b48c0991c7
74 changed files with 1998 additions and 1860 deletions

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.physics.box2d.box2d-gwt' />
<inherits name='Moment' />
<inherits name='Mindustry' />
<inherits name='uCore' />
<inherits name='com.badlogic.gdx.ai' />
<entry-point class='io.anuke.moment.client.HtmlLauncher' />
<entry-point class='io.anuke.mindustry.client.HtmlLauncher' />
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
<set-configuration-property name="gdx.assetpath" value="../core/assets" />
</module>

View File

@@ -2,8 +2,9 @@
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.physics.box2d.box2d-gwt' />
<inherits name='io.anuke.moment.GdxDefinition' />
<inherits name='io.anuke.mindustry.GdxDefinition' />
<collapse-all-properties />

View File

@@ -1,15 +1,14 @@
package io.anuke.moment.client;
package io.anuke.mindustry.client;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.gwt.GwtApplication;
import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration;
import io.anuke.mindustry.Mindustry;
import com.google.gwt.dom.client.*;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.VerticalPanel;
import io.anuke.mindustry.Moment;
public class HtmlLauncher extends GwtApplication {
static final int WIDTH = 800;
static final int HEIGHT = 600;
@@ -49,7 +48,7 @@ public class HtmlLauncher extends GwtApplication {
setupResizeHook();
}
});
return new Moment();
return new Mindustry();
}
void scaleCanvas() {
@@ -90,11 +89,11 @@ public class HtmlLauncher extends GwtApplication {
}-*/;
native void setupResizeHook() /*-{
var htmlLauncher_onWindowResize = $entry(@io.anuke.moment.client.HtmlLauncher::handleResize());
var htmlLauncher_onWindowResize = $entry(@io.anuke.mindustry.client.HtmlLauncher::handleResize());
$wnd.addEventListener('resize', htmlLauncher_onWindowResize, false);
}-*/;
public static void handleResize() {
instance.scaleCanvas();
}
}
}