Package universalelectricity.api.vector

Examples of universalelectricity.api.vector.Vector2


{
  private TileFortronCapacitor tileEntity;

  public GuiButtonPressTransferMode(int id, int x, int y, GuiMFFS mainGui, TileFortronCapacitor tileEntity)
  {
    super(id, x, y, new Vector2(), mainGui);
    this.tileEntity = tileEntity;
  }
View Full Code Here


    this(id, x, y, offset, null, "");
  }

  public GuiButtonPress(int id, int x, int y)
  {
    this(id, x, y, new Vector2());
  }
View Full Code Here

  }

  @Override
  public void initGui()
  {
    this.textFieldPos = new Vector2(111, 93);
    super.initGui();

    this.buttonList.add(new GuiIcon(1, this.width / 2 - 82, this.height / 2 - 16, new ItemStack(Item.pocketSundial)));
    this.buttonList.add(new GuiIcon(2, this.width / 2 - 82, this.height / 2 - 82, null, new ItemStack(Item.redstone), new ItemStack(Block.blockRedstone)));
    this.buttonList.add(new GuiIcon(3, this.width / 2 - 82, this.height / 2 - 60, null, new ItemStack(Block.anvil)));
    this.buttonList.add(new GuiIcon(4, this.width / 2 - 82, this.height / 2 - 38, null, new ItemStack(Item.compass)));

    this.tooltips.put(new Rectangle(new Vector2(117, 44), new Vector2(117, 44).add(18)), LanguageUtility.getLocal("gui.projector.mode"));

    this.tooltips.put(new Rectangle(new Vector2(90, 17), new Vector2(90, 17).add(18)), LanguageUtility.getLocal("gui.projector.up"));
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17), new Vector2(90 + 18 * 3, 17).add(18)), LanguageUtility.getLocal("gui.projector.up"));

    this.tooltips.put(new Rectangle(new Vector2(90, 17 + 18 * 3), new Vector2(90, 17 + 18 * 3).add(18)), LanguageUtility.getLocal("gui.projector.down"));
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17 + 18 * 3), new Vector2(90 + 18 * 3, 17 + 18 * 3).add(18)), LanguageUtility.getLocal("gui.projector.down"));

    String north = LanguageUtility.getLocal("gui.projector.north");
    String south = LanguageUtility.getLocal("gui.projector.south");
    String west = LanguageUtility.getLocal("gui.projector.west");
    String east = LanguageUtility.getLocal("gui.projector.east");

    if (!this.tileEntity.isAbsolute)
    {
      north = LanguageUtility.getLocal("gui.projector.front");
      south = LanguageUtility.getLocal("gui.projector.back");
      west = LanguageUtility.getLocal("gui.projector.left");
      east = LanguageUtility.getLocal("gui.projector.right");
    }

    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 1, 17), new Vector2(90 + 18 * 1, 17).add(18)), north);
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 2, 17), new Vector2(90 + 18 * 2, 17).add(18)), north);

    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 1, 17 + 18 * 3), new Vector2(90 + 18 * 1, 17 + 18 * 3).add(18)), south);
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 2, 17 + 18 * 3), new Vector2(90 + 18 * 2, 17 + 18 * 3).add(18)), south);

    this.tooltips.put(new Rectangle(new Vector2(90, 17 + 18 * 1), new Vector2(90 + 18 * 1, 17 + 18 * 1).add(18)), west);
    this.tooltips.put(new Rectangle(new Vector2(90, 17 + 18 * 2), new Vector2(90 + 18 * 1, 17 + 18 * 2).add(18)), west);

    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17 + 18 * 1), new Vector2(90 + 18 * 3, 17 + 18 * 1).add(18)), east);
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17 + 18 * 2), new Vector2(90 + 18 * 3, 17 + 18 * 2).add(18)), east);
  }
View Full Code Here

  }

  @Override
  public void initGui()
  {
    this.textFieldPos = new Vector2(50, 76);
    super.initGui();
    this.buttonList.add(new GuiButtonPressTransferMode(1, this.width / 2 + 15, this.height / 2 - 37, this, this.tileEntity));

  }
View Full Code Here

  }

  @Override
  public void initGui()
  {
    this.textFieldPos = new Vector2(48, 91);
    super.initGui();
    this.buttonList.add(new GuiIcon(1, this.width / 2 - 82, this.height / 2 - 82, null, new ItemStack(Item.compass)));

    this.tooltips.put(new Rectangle(new Vector2(117, 44), new Vector2(117, 44).add(18)), LanguageUtility.getLocal("gui.projector.mode"));

    this.tooltips.put(new Rectangle(new Vector2(90, 17), new Vector2(90, 17).add(18)), LanguageUtility.getLocal("gui.projector.up"));
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17), new Vector2(90 + 18 * 3, 17).add(18)), LanguageUtility.getLocal("gui.projector.up"));

    this.tooltips.put(new Rectangle(new Vector2(90, 17 + 18 * 3), new Vector2(90, 17 + 18 * 3).add(18)), LanguageUtility.getLocal("gui.projector.down"));
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17 + 18 * 3), new Vector2(90 + 18 * 3, 17 + 18 * 3).add(18)), LanguageUtility.getLocal("gui.projector.down"));

    String north = LanguageUtility.getLocal("gui.projector.north");
    String south = LanguageUtility.getLocal("gui.projector.south");
    String west = LanguageUtility.getLocal("gui.projector.west");
    String east = LanguageUtility.getLocal("gui.projector.east");

    if (!this.tileEntity.isAbsolute)
    {
      north = LanguageUtility.getLocal("gui.projector.front");
      south = LanguageUtility.getLocal("gui.projector.back");
      west = LanguageUtility.getLocal("gui.projector.left");
      east = LanguageUtility.getLocal("gui.projector.right");
    }

    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 1, 17), new Vector2(90 + 18 * 1, 17).add(18)), north);
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 2, 17), new Vector2(90 + 18 * 2, 17).add(18)), north);

    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 1, 17 + 18 * 3), new Vector2(90 + 18 * 1, 17 + 18 * 3).add(18)), south);
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 2, 17 + 18 * 3), new Vector2(90 + 18 * 2, 17 + 18 * 3).add(18)), south);

    this.tooltips.put(new Rectangle(new Vector2(90, 17 + 18 * 1), new Vector2(90 + 18 * 1, 17 + 18 * 1).add(18)), west);
    this.tooltips.put(new Rectangle(new Vector2(90, 17 + 18 * 2), new Vector2(90 + 18 * 1, 17 + 18 * 2).add(18)), west);

    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17 + 18 * 1), new Vector2(90 + 18 * 3, 17 + 18 * 1).add(18)), east);
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17 + 18 * 2), new Vector2(90 + 18 * 3, 17 + 18 * 2).add(18)), east);
  }
View Full Code Here

  }

  @Override
  public void initGui()
  {
    this.textFieldPos = new Vector2(109, 92);
    super.initGui();

    this.textFieldUsername = new GuiTextField(this.fontRenderer, 52, 18, 90, 12);
    this.textFieldUsername.setMaxStringLength(30);

    int x = 0;
    int y = 0;

    for (int i = 0; i < Permission.getPermissions().length; i++)
    {
      x++;
      this.buttonList.add(new GuiButtonPress(i + 1, this.width / 2 - 50 + 20 * x, this.height / 2 - 75 + 20 * y, new Vector2(18, 18 * i), this, Permission.getPermissions()[i].name));

      if (i % 3 == 0 && i != 0)
      {
        x = 0;
        y++;
View Full Code Here

  }

  @Override
  public void initGui()
  {
    this.textFieldPos = new Vector2(30, 43);
    super.initGui();
    this.buttonList.add(new GuiButton(1, this.width / 2 - 10, this.height / 2 - 28, 58, 20, LanguageUtility.getLocal("gui.deriver.derive")));
  }
View Full Code Here

  }

  @Override
  public void initGui()
  {
    this.textFieldPos = new Vector2(110, 91);
    super.initGui();

    // Inverse Button
    this.buttonList.add(new GuiButton(1, this.width / 2 - 80, this.height / 2 - 65, 50, 20, LanguageUtility.getLocal("gui.matrix.banned")));
  }
View Full Code Here

  private void renderPlayerFace(ResourceLocation resourcelocation)
  {
    if (resourcelocation != null)
    {
      Vector2 translation = new Vector2(9, 5);
      int xSize = 4;
      int ySize = 4;

      int topLX = translation.intX();
      int topRX = translation.intX() + xSize;
      int botLX = translation.intX();
      int botRX = translation.intX() + xSize;

      int topLY = translation.intY();
      int topRY = translation.intY();
      int botLY = translation.intY() + ySize;
      int botRY = translation.intY() + ySize;

      FMLClientHandler.instance().getClient().renderEngine.bindTexture(resourcelocation);
      // glBindTexture(GL_TEXTURE_2D, texID);

      glColor4f(1, 1, 1, 1);
View Full Code Here

TOP

Related Classes of universalelectricity.api.vector.Vector2

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.