Package codechicken.lib.vec

Examples of codechicken.lib.vec.Rectangle4i


  }
 
  @Override
  public Rectangle4i getBounds(int guiWidth, int guiHeight)
  {
    return new Rectangle4i(guiWidth + xLocation, guiHeight + yLocation, type.width, type.height);
  }
View Full Code Here


  }
 
  @Override
  public Rectangle4i getBounds(int guiWidth, int guiHeight)
  {
    return new Rectangle4i(guiWidth + xLocation, guiHeight + yLocation, width, height);
  }
View Full Code Here

  }
 
  @Override
  public Rectangle4i getBounds(int guiWidth, int guiHeight)
  {
    return new Rectangle4i(guiWidth + 176, guiHeight + 6, 26, 63);
  }
View Full Code Here

  }
 
  @Override
  public Rectangle4i getBounds(int guiWidth, int guiHeight)
  {
    return new Rectangle4i(guiWidth + xLocation, guiHeight + yLocation, width, height);
  }
View Full Code Here

    public void update() {
    }

    public Rectangle4i bounds() {
        return new Rectangle4i(x, y, w, h);
    }
View Full Code Here

            }

            @Override
            protected void drawSlot(int slot, int x, int y, int mx, int my, float frame) {
                int w = windowBounds().width;
                Rectangle4i r = new Rectangle4i(x, y, w, getSlotHeight(slot));
                if(slot < sorted.size()) {
                    SubsetTag tag = sorted.get(slot);
                    LayoutManager.getLayoutStyle().drawSubsetTag(tag.displayName(), x, y, r.w, r.h, tag.state.state, r.contains(mx, my));
                }
                else {
                    ItemStack stack = state.items.get(slot-sorted.size());
                    boolean hidden = SubsetWidget.isHidden(stack);

                    int itemx = w/2-8;
                    int itemy = 1;

                    LayoutManager.getLayoutStyle().drawSubsetTag(null, x, y, r.w, r.h, hidden ? 0 : 2, false);

                    GuiContainerManager.drawItem(x+itemx, y+itemy, stack);
                    if(new Rectangle4i(itemx, itemy, 16, 16).contains(mx, my))
                        SubsetWidget.hoverStack = stack;
                }
            }
View Full Code Here

                itemsPerPage++;
            }
    }

    private boolean slotValid(GuiContainer gui, int i) {
        Rectangle4i rect = getSlotRect(i);
        for (INEIGuiHandler handler : GuiInfo.guiHandlers)
            if (handler.hideItemPanelSlot(gui, rect.x, rect.y, rect.w, rect.h))
                return false;
        return true;
    }
View Full Code Here

    public Rectangle4i getSlotRect(int i) {
        return getSlotRect(i / columns, i % columns);
    }

    public Rectangle4i getSlotRect(int row, int column) {
        return new Rectangle4i(marginLeft + column * 18, marginTop + row * 18, 18, 18);
    }
View Full Code Here

        GuiContainerManager.enableMatrixStackLogging();
        int index = firstIndex;
        for (int i = 0; i < rows * columns && index < items.size(); i++) {
            if (validSlotMap[i]) {
                Rectangle4i rect = getSlotRect(i);
                if (rect.contains(mousex, mousey))
                    drawRect(rect.x, rect.y, rect.w, rect.h, 0xee555555);//highlight

                GuiContainerManager.drawItem(rect.x + 1, rect.y + 1, items.get(index));

                index++;
View Full Code Here

    }

    @Override
    public boolean contains(int px, int py) {
        GuiContainer gui = NEIClientUtils.getGuiContainer();
        Rectangle4i rect = new Rectangle4i(px, py, 1, 1);
        for (INEIGuiHandler handler : GuiInfo.guiHandlers)
            if (handler.hideItemPanelSlot(gui, rect.x, rect.y, rect.w, rect.h))
                return false;

        return super.contains(px, py);
View Full Code Here

TOP

Related Classes of codechicken.lib.vec.Rectangle4i

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.