Re-coded everything
This commit is contained in:
+2
-2
@@ -7,8 +7,8 @@ gwt {
|
||||
minHeapSize="1G"
|
||||
|
||||
src = files(file("src/")) // Needs to be in front of "modules" below.
|
||||
modules 'io.anuke.moment.GdxDefinition'
|
||||
devModules 'io.anuke.moment.GdxDefinitionSuperdev'
|
||||
modules 'io.anuke.mindustry.GdxDefinition'
|
||||
devModules 'io.anuke.mindustry.GdxDefinitionSuperdev'
|
||||
project.webAppDirName = 'webapp'
|
||||
|
||||
compiler {
|
||||
|
||||
+4
-4
@@ -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>
|
||||
+2
-1
@@ -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 />
|
||||
|
||||
+5
-6
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Moment</title>
|
||||
<title>Mindustry</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<link href="styles.css" rel="stylesheet" type="text/css">
|
||||
<script src="soundmanager2-setup.js"></script>
|
||||
<script src="soundmanager2-jsmin.js"></script>
|
||||
</head>
|
||||
|
||||
<body onkeydown="preventUseOfDefaultKeys(event);" oncontextmenu="return false;">
|
||||
<body onkeydown="preventUseOfDefaultKeys(event);">
|
||||
<div align="center" id="embed-html"></div>
|
||||
<script type="text/javascript" src="html/html.nocache.js"></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user