Beispiel #1
0
  @Override
  protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
    super.drawGuiContainerForegroundLayer(mouseX, mouseY);

    int xAxis = (mouseX - (width - xSize) / 2);
    int yAxis = (mouseY - (height - ySize) / 2);

    for (GuiElement element : guiElements) {
      element.renderForeground(xAxis, yAxis);
    }

    if (tileEntity != null) {
      Slot hovering = null;

      for (int i = 0; i < inventorySlots.inventorySlots.size(); i++) {
        Slot slot = (Slot) inventorySlots.inventorySlots.get(i);

        if (isMouseOverSlot(slot, mouseX, mouseY)) {
          hovering = slot;
          break;
        }
      }

      ItemStack stack = mc.thePlayer.inventory.getItemStack();

      if (stack != null && stack.getItem() instanceof ItemConfigurator && hovering != null) {
        SideData data = getFromSlot(hovering);

        if (data != null) {
          drawCreativeTabHoveringText(data.color.getName(), xAxis, yAxis);
        }
      }
    }
  }
Beispiel #2
0
  @Override
  protected void drawGuiContainerForegroundLayer(int x, int y) {
    GL11.glPushMatrix();
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glDisable(GL11.GL_LIGHTING);

    GL11.glPushMatrix();

    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

    // GL11.glBegin(GL11.GL_TRIANGLE_FAN);
    GL11.glBegin(GL11.GL_LINE_LOOP);
    for (int ii = 0; ii < 50; ii++) {
      float theta = 2.0f * 3.1415926f * ii / 50; // get the current angle

      float xLocation = 50 * (float) Math.cos(theta); // calculate the x component
      float yLocation = 50 * (float) Math.sin(theta); // calculate the y component

      GL11.glVertex2f(xLocation + 60f, yLocation + 60f); // output vertex
    }
    GL11.glEnd();

    GL11.glPopMatrix();

    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glDisable(GL11.GL_BLEND);
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_LIGHTING);
    GL11.glPopMatrix();

    super.drawGuiContainerForegroundLayer(x, y);
  }
Beispiel #3
0
 @Override
 protected void drawGuiContainerForegroundLayer(int par1, int par2) {
   String str = String.valueOf(page + 1);
   int swidth = fontRenderer.getStringWidth(str);
   fontRenderer.drawString(str, xBegin - swidth, yBegin, 0x000000);
   fontRenderer.drawString(
       "/" + AnimalCrossingChest.get().getSizePages(), xBegin, yBegin, 0x000000);
   super.drawGuiContainerForegroundLayer(par1, par2);
 }
 @Override
 protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
   super.drawGuiContainerForegroundLayer(mouseX, mouseY);
   mouseX -= guiLeft;
   mouseY -= guiTop;
   for (Control c : _controls) {
     if (c.getVisible()) {
       c.drawForeground(mouseX, mouseY);
     }
   }
 }
Beispiel #5
0
 @Override
 protected void drawGuiContainerForegroundLayer(int par1, int par2) {
   // TODO Auto-generated method stub
   super.drawGuiContainerForegroundLayer(par1, par2);
 }
 @Override
 protected void drawGuiContainerForegroundLayer(int par1, int par2) {
   super.drawGuiContainerForegroundLayer(par1, par2);
 }