OSDN Git Service

Added a way to change the Assets loader base URL for some special cases, overriding...
[mikumikustudio/libgdx-mikumikustudio.git] / backends / gdx-backends-gwt / src / com / badlogic / gdx / backends / gwt / GwtApplication.java
index fc4ab9b..71ac15d 100644 (file)
@@ -80,6 +80,12 @@ public abstract class GwtApplication implements EntryPoint, Application {
        /** @return the configuration for the {@link GwtApplication}. */
        public abstract GwtApplicationConfiguration getConfig ();
 
+       
+       public String getPreloaderBaseURL()
+       {
+               return GWT.getHostPageBaseURL() + "assets/";
+       }
+       
        @Override
        public void onModuleLoad () {
                GwtApplication.agentInfo = computeAgentInfo();
@@ -215,7 +221,7 @@ public abstract class GwtApplication implements EntryPoint, Application {
        long loadStart = TimeUtils.nanoTime();
 
        public Preloader createPreloader() {
-               return new Preloader();
+               return new Preloader(getPreloaderBaseURL());
        }
 
        public PreloaderCallback getPreloaderCallback () {