Java 类com.badlogic.gdx.backends.gwt.preloader.Preloader 实例源码

项目:odb-artax    文件:HtmlLauncher.java   
@Override
public Preloader.PreloaderCallback getPreloaderCallback() {
    final VerticalPanel preloaderPanel = new VerticalPanel();
    preloaderPanel.setStyleName("gdx-preloader");
    preloaderPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    final Image logo = new Image(GWT.getModuleBaseURL() + "logo.gif");
    logo.setStyleName("logo");
    preloaderPanel.add(logo);
    final Panel meterPanel = new SimplePanel();
    meterPanel.setStyleName("gdx-meter");
    meterPanel.addStyleName("red");
    final InlineHTML meter = new InlineHTML();
    final Style meterStyle = meter.getElement().getStyle();
    meterStyle.setWidth(0, Style.Unit.PCT);
    meterPanel.add(meter);
    preloaderPanel.add(meterPanel);
    getRootPanel().add(preloaderPanel);
    return new Preloader.PreloaderCallback() {
        @Override
        public void error(String file) {
            System.out.println("error: " + file);
        }

        @Override
        public void update(Preloader.PreloaderState state) {
            meterStyle.setWidth(100f * state.getProgress(), Style.Unit.PCT);
        }

    };
}
项目:odb-little-fortune-planet    文件:HtmlLauncher.java   
@Override
public Preloader.PreloaderCallback getPreloaderCallback() {
    final VerticalPanel preloaderPanel = new VerticalPanel();
    preloaderPanel.setStyleName("gdx-preloader");
    preloaderPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    final Image logo = new Image(GWT.getModuleBaseURL() + "logo.gif");
    logo.setStyleName("logo");
    preloaderPanel.add(logo);
    final Panel meterPanel = new SimplePanel();
    meterPanel.setStyleName("gdx-meter");
    meterPanel.addStyleName("red");
    final InlineHTML meter = new InlineHTML();
    final Style meterStyle = meter.getElement().getStyle();
    meterStyle.setWidth(0, Style.Unit.PCT);
    meterPanel.add(meter);
    preloaderPanel.add(meterPanel);
    getRootPanel().add(preloaderPanel);
    return new Preloader.PreloaderCallback() {
        @Override
        public void error(String file) {
            System.out.println("error: " + file);
        }

        @Override
        public void update(Preloader.PreloaderState state) {
            meterStyle.setWidth(100f * state.getProgress(), Style.Unit.PCT);
        }

    };
}
项目:libgdxcn    文件:GwtFileHandle.java   
public GwtFileHandle (Preloader preloader, String fileName, FileType type) {
    if (type != FileType.Internal && type != FileType.Classpath)
        throw new GdxRuntimeException("FileType '" + type + "' Not supported in GWT backend");
    this.preloader = preloader;
    this.file = fixSlashes(fileName);
    this.type = type;
}
项目:libgdxcn    文件:GwtApplication.java   
public Preloader createPreloader() {
    return new Preloader(getPreloaderBaseURL());
}
项目:libgdxcn    文件:GwtApplication.java   
public Preloader getPreloader () {
    return preloader;
}
项目:libgdxcn    文件:GwtFiles.java   
public GwtFiles (Preloader preloader) {
    this.preloader = preloader;
}
项目:TinyVoxel    文件:GwtApplication.java   
public Preloader createPreloader() {
    return new Preloader(getPreloaderBaseURL());
}
项目:TinyVoxel    文件:GwtApplication.java   
public Preloader getPreloader () {
    return preloader;
}
项目:vtm    文件:GwtApplication.java   
public Preloader createPreloader() {
    return new Preloader(getPreloaderBaseURL());
}
项目:vtm    文件:GwtApplication.java   
public Preloader getPreloader() {
    return preloader;
}