Пример #1
0
 public Texture setUrl(String url) {
   this.url = url;
   if (getUrl() != null) {
     Spoutcraft.getClient()
         .getRenderDelegate()
         .downloadTexture(getAddon().getDescription().getName(), getUrl());
   }
   return this;
 }
Пример #2
0
 @Override
 public void onTick() {
   int width = Spoutcraft.getClient().getRenderDelegate().getScreenWidth();
   int height = Spoutcraft.getClient().getRenderDelegate().getScreenHeight();
   if (width != screenWidth || height != screenHeight) {
     onScreenResized(screenWidth, screenHeight, width, height);
   }
   screenWidth = width;
   screenHeight = height;
   for (Widget widget : new HashSet<Widget>(widgets.keySet())) {
     try {
       widget.onTick();
     } catch (Exception e) {
       e.printStackTrace();
     }
   }
   for (Widget widget : widgets.keySet()) {
     try {
       widget.onAnimate();
     } catch (Exception e) {
       e.printStackTrace();
     }
   }
 }
Пример #3
0
 public GenericScreen() {
   screenWidth = Spoutcraft.getClient().getRenderDelegate().getScreenWidth();
   screenHeight = Spoutcraft.getClient().getRenderDelegate().getScreenHeight();
   spoutcraft = Spoutcraft.getAddonManager().getAddon("Spoutcraft");
 }
Пример #4
0
 public void render() {
   Spoutcraft.getClient().getRenderDelegate().render(this);
 }