예제 #1
0
 @Override
 public void drawChildren() {
   GuiRenderer renderer = getRenderer();
   renderer.setClippingRegion(absoluteX() + 1, absoluteY() + 1, width() - 2, height() - 2);
   innerPanel.setPosition(0, -(int) scrollBar.getValue());
   try {
     super.drawChildren();
   } finally {
     renderer.clearClippingRegion();
   }
 }
예제 #2
0
  @Override
  public void renderGridRow(GuiRenderer renderer, int xOffset, int yOffset, int row) {
    Set<CraftType> types = recipeCache.getCraftTypes();

    if (row < types.size()) {
      CraftType type = (CraftType) types.toArray()[row];
      displayBackground.renderRect(renderer, xOffset, yOffset, width(), rowHeight, 0, 0);
      renderer.drawItemStack(type.getDisplayStack(), xOffset + 8, yOffset + 8, false);

      if (hidden(type)) {
        hiddenOverlay.render(renderer, xOffset + 8, yOffset + 8);
      }

      for (int i = 0; i < 3; i++) {
        TexturedRect rect = buttons[i == setting(type) ? i + 3 : i];

        rect.render(
            renderer, xOffset + i * 29 + (bounds.width() - (3 * 29 + 24)) / 2 + 24, yOffset + 2);
      }
    }
  }
예제 #3
0
 @Override
 public void render(GuiRenderer renderer) {
   renderer.renderFontModel(this._font_model);
 }