summaryrefslogtreecommitdiff
path: root/html/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'html/src/main')
-rw-r--r--html/src/main/java/kz/ilotterytea/frogartha/GdxDefinition.gwt.xml60
-rw-r--r--html/src/main/java/kz/ilotterytea/frogartha/gwt/GwtLauncher.java2
2 files changed, 34 insertions, 28 deletions
diff --git a/html/src/main/java/kz/ilotterytea/frogartha/GdxDefinition.gwt.xml b/html/src/main/java/kz/ilotterytea/frogartha/GdxDefinition.gwt.xml
index 3f287d1..266f4a8 100644
--- a/html/src/main/java/kz/ilotterytea/frogartha/GdxDefinition.gwt.xml
+++ b/html/src/main/java/kz/ilotterytea/frogartha/GdxDefinition.gwt.xml
@@ -1,35 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.11.0//EN" "https://www.gwtproject.org/doctype/2.11.0/gwt-module.dtd">
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.11.0//EN"
+ "https://www.gwtproject.org/doctype/2.11.0/gwt-module.dtd">
<module rename-to="html">
- <!-- Paths to source are relative to this file and separated by slashes ('/'). -->
- <source path="" />
+ <!-- Paths to source are relative to this file and separated by slashes ('/'). -->
+ <source path=""/>
- <!-- "Inherits" lines are how GWT knows where to look for code and configuration in other projects or libraries. -->
- <inherits name="com.badlogic.gdx.backends.gdx_backends_gwt" />
- <inherits name="GLTF" />
- <inherits name="kz.ilotterytea.frogartha.FrogarthaGame" />
- <inherits name="kz.ilotterytea.frogartha.Shared" />
+ <!-- "Inherits" lines are how GWT knows where to look for code and configuration in other projects or libraries. -->
+ <inherits name="com.badlogic.gdx.backends.gdx_backends_gwt"/>
+ <inherits name="GLTF"/>
+ <inherits name="kz.ilotterytea.frogartha.FrogarthaGame"/>
+ <inherits name="kz.ilotterytea.frogartha.Shared"/>
+ <inherits name='com.github.czyzby.websocket.GdxWebSocket'/>
+ <inherits name='com.github.czyzby.websocket.GdxWebSocketGwt'/>
+ <inherits name='com.github.czyzby.websocket.GdxWebSocketSerialization'/>
- <!-- You must change this if you rename packages later, or rename GwtLauncher. -->
- <entry-point class="kz.ilotterytea.frogartha.gwt.GwtLauncher" />
+ <!-- You must change this if you rename packages later, or rename GwtLauncher. -->
+ <entry-point class="kz.ilotterytea.frogartha.gwt.GwtLauncher"/>
- <!-- Reflection includes may be needed for your code or library code. Each value is separated by periods ('.'). -->
- <!-- You can include a full package by not including the name of a type at the end. -->
- <!-- This is a feature of libGDX, so these lines go after the above "inherits" that brings in libGDX. -->
- <!-- <extend-configuration-property name="gdx.reflect.include" value="fully.qualified.TypeName" /> -->
+ <!-- Reflection includes may be needed for your code or library code. Each value is separated by periods ('.'). -->
+ <!-- You can include a full package by not including the name of a type at the end. -->
+ <!-- This is a feature of libGDX, so these lines go after the above "inherits" that brings in libGDX. -->
+ <!-- <extend-configuration-property name="gdx.reflect.include" value="fully.qualified.TypeName" /> -->
- <!-- Rarely, projects may need to include files but do not have access to the complete assets. -->
- <!-- This happens for libraries and shared projects, typically, and the configuration goes in that project. -->
- <!-- The value is a path, separated by forward slashes, where the root is your html project's resources root. -->
- <!-- You can include individual files like this, and access them with Gdx.files.classpath("path/to/file.png") : -->
- <!-- This is also a feature of libGDX, so these lines go after the above "inherits" that brings in libGDX. -->
- <!-- <extend-configuration-property name="gdx.files.classpath" value="path/to/file.png" /> -->
+ <!-- Rarely, projects may need to include files but do not have access to the complete assets. -->
+ <!-- This happens for libraries and shared projects, typically, and the configuration goes in that project. -->
+ <!-- The value is a path, separated by forward slashes, where the root is your html project's resources root. -->
+ <!-- You can include individual files like this, and access them with Gdx.files.classpath("path/to/file.png") : -->
+ <!-- This is also a feature of libGDX, so these lines go after the above "inherits" that brings in libGDX. -->
+ <!-- <extend-configuration-property name="gdx.files.classpath" value="path/to/file.png" /> -->
- <!-- You usually won't need to make changes to the rest of this. -->
- <set-configuration-property name="gdx.assetpath" value="../assets" />
- <set-configuration-property name="xsiframe.failIfScriptTag" value="FALSE"/>
- <!-- These two lines reduce the work GWT has to do during compilation and also shrink output size. -->
- <set-property name="user.agent" value="gecko1_8, safari"/>
- <collapse-property name="user.agent" values="*" />
- <!-- Remove the "user.agent" lines above if you encounter issues with Safari or other Gecko browsers. -->
-</module> \ No newline at end of file
+ <!-- You usually won't need to make changes to the rest of this. -->
+ <set-configuration-property name="gdx.assetpath" value="../assets"/>
+ <set-configuration-property name="xsiframe.failIfScriptTag" value="FALSE"/>
+ <!-- These two lines reduce the work GWT has to do during compilation and also shrink output size. -->
+ <set-property name="user.agent" value="gecko1_8, safari"/>
+ <collapse-property name="user.agent" values="*"/>
+ <!-- Remove the "user.agent" lines above if you encounter issues with Safari or other Gecko browsers. -->
+</module>
diff --git a/html/src/main/java/kz/ilotterytea/frogartha/gwt/GwtLauncher.java b/html/src/main/java/kz/ilotterytea/frogartha/gwt/GwtLauncher.java
index a4e7ea3..bafa596 100644
--- a/html/src/main/java/kz/ilotterytea/frogartha/gwt/GwtLauncher.java
+++ b/html/src/main/java/kz/ilotterytea/frogartha/gwt/GwtLauncher.java
@@ -3,6 +3,7 @@ package kz.ilotterytea.frogartha.gwt;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.gwt.GwtApplication;
import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration;
+import com.github.czyzby.websocket.GwtWebSockets;
import kz.ilotterytea.frogartha.FrogarthaGame;
/**
@@ -23,6 +24,7 @@ public class GwtLauncher extends GwtApplication {
@Override
public ApplicationListener createApplicationListener() {
+ GwtWebSockets.initiate();
return FrogarthaGame.getInstance();
}
}