Package logisticspipes.utils.gui.hud

Examples of logisticspipes.utils.gui.hud.BasicHUDButton


  }
 
  private HUDSatellite(PipeItemsSatelliteLogistics pPipe1, PipeFluidSatellite pPipe2) {
    this.pipe1 = pPipe1;
    this.pipe2 = pPipe2;
    this.addButton(new BasicHUDButton("<", -2, -40, 8, 8) {
      @Override
      public void clicked() {
        if(page > 0) {
          page--;
        }
      }

      @Override
      public boolean shouldRenderButton() {
        if(pipe1 != null) return pipe1.itemList.size() > 0;
        return pipe2.itemList.size() > 0;
      }

      @Override
      public boolean buttonEnabled() {
        return page > 0;
      }
    });
    this.addButton(new BasicHUDButton(">", 37, -40, 8, 8) {
      @Override
      public void clicked() {
        if(page + 1 < getMaxPage()) {
          page++;
        }
View Full Code Here


    this.module = _module;
    this.moduleInventory = _moduleInventory;
    for(int i=0;i<pipe.getChassiSize();i++) {
      this.addButton(new ItemButton(moduleInventory, i, -45, -35 + ((i % 3) * 27), 20, 25));
    }
    this.addButton(new BasicHUDButton("<",-45,-45,8,8) {
     
      @Override
      public boolean shouldRenderButton() {
        return !isSlotSelected();
      }
     
      @Override
      public void clicked() {
        modulePage--;
      }
     
      @Override
      public boolean buttonEnabled() {
        return modulePage > 0;
      }
    });
    this.addButton(new BasicHUDButton(">",-33,-45,8,8) {
     
      @Override
      public boolean shouldRenderButton() {
        return !isSlotSelected();
      }
     
      @Override
      public void clicked() {
        modulePage++;
      }
     
      @Override
      public boolean buttonEnabled() {
        return modulePage < ((pipe.getChassiSize() - 1) / 3);
      }
    });
    this.addButton(new BasicHUDButton("x",37,-45,8,8) {
     
      @Override
      public boolean shouldRenderButton() {
        return isSlotSelected();
      }
View Full Code Here

  private int page = 0;
  private int pageB = 0;
 
  public HUDProvider(final PipeItemsProviderLogistics pipe) {
    this.pipe = pipe;
    this.addButton(new BasicHUDButton("<", -2, -50, 8, 8) {
      @Override
      public void clicked() {
        if(page > 0) {
          page--;
        }
      }

      @Override
      public boolean shouldRenderButton() {
        return true;
      }

      @Override
      public boolean buttonEnabled() {
        return page > 0;
      }
    });
    this.addButton(new BasicHUDButton(">", 37, -50, 8, 8) {
      @Override
      public void clicked() {
        if(page + 1 < getMaxPage()) {
          page++;
        }
      }

      @Override
      public boolean shouldRenderButton() {
        return true;
      }

      @Override
      public boolean buttonEnabled() {
        return page + 1 < getMaxPage();
      }
    });
    this.addButton(new BasicHUDButton("<", -2, 21, 8, 8) {
      @Override
      public void clicked() {
        if(pageB > 0) {
          pageB--;
        }
      }

      @Override
      public boolean shouldRenderButton() {
        return true;
      }

      @Override
      public boolean buttonEnabled() {
        return pageB > 0;
      }
    });
    this.addButton(new BasicHUDButton(">", 37, 21, 8, 8) {
      @Override
      public void clicked() {
        if(pageB + 1 < getMaxPageOrderer()) {
          pageB++;
        }
View Full Code Here

  private int page = 0;
 
  private final ModuleProvider module;

  public HUDProviderModule(ModuleProvider moduleProvider) {
    buttons.add(new BasicHUDButton("<" , 8, -35, 8, 8) {
      @Override
      public boolean shouldRenderButton() {
        return true;
      }
     
      @Override
      public void clicked() {
        page--;
      }
     
      @Override
      public boolean buttonEnabled() {
        return page > 0;
      }
    });
    buttons.add(new BasicHUDButton(">" , 20, -35, 8, 8) {
      @Override
      public boolean shouldRenderButton() {
        return true;
      }
     
View Full Code Here

  private final List<IHUDButton> list;
 
  public HUDModBasedItemSink(ModuleModBasedItemSink module) {
    itemSink = module;
    list = new ArrayList<IHUDButton>();
    list.add(new BasicHUDButton("<", 10, -35, 8, 8) {
     
      @Override
      public boolean shouldRenderButton() {
        return true;
      }
     
      @Override
      public void clicked() {
        page--;
      }
     
      @Override
      public boolean buttonEnabled() {
        return page > 0;
      }
    });
    list.add(new BasicHUDButton(">", 20, -35, 8, 8) {
     
      @Override
      public boolean shouldRenderButton() {
        return true;
      }
View Full Code Here

    }
   
  }
 
  private void addUntraceButtons(final int index) {
    this.addButton(new BasicHUDButton("Untrack", -25, -75, 50, 10) {
      @Override
      public boolean shouldRenderButton() {
        return !isQuestion && display;
      }
     
      @Override
      public void clicked() {
        isQuestion = true;
      }
     
      @Override
      public boolean buttonEnabled() {
        return !isQuestion && display;
      }
    });
   
    this.addButton(new BasicHUDButton("Yes", -45, -75, 30, 10) {
      @Override
      public boolean shouldRenderButton() {
        return isQuestion && display;
      }
     
      @Override
      public void clicked() {
        MainProxy.sendPacketToServer(PacketHandler.getPacket(RoutingUpdateUntrace.class).setInteger(index));
        display = false;
      }
     
      @Override
      public boolean buttonEnabled() {
        return isQuestion && display;
      }
    });
    this.addButton(new BasicHUDButton("No", 15, -75, 30, 10) {
      @Override
      public boolean shouldRenderButton() {
        return isQuestion && display;
      }
     
View Full Code Here

TOP

Related Classes of logisticspipes.utils.gui.hud.BasicHUDButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.