예제 #1
0
  @Override
  int getColor(int hoverState, boolean bg) {
    final int color = super.getColor(hoverState, bg);

    return highlight && hoverState != 2
        ? SAOColor.mediumColor(color, SAOColor.DEFAULT_COLOR.mediumColor(0xFF))
        : color;
  }
예제 #2
0
  @Override
  public void draw(Minecraft mc, int cursorX, int cursorY) {
    super.draw(mc, cursorX, cursorY);

    if ((visibility > 0) && (enabled)) {
      final int left = getX(false);
      final int top = getY(false);

      final int iconOffset = (height - 16) / 2;
      final ItemStack stack = getStack();

      if (stack != null) {
        SAOGL.glString(
            "x" + stack.stackSize,
            left + width + 2,
            top + height - 16,
            SAOColor.multiplyAlpha(getColor(hoverState(cursorX, cursorY), false), visibility),
            true);
        this.drawSlot(mc, stack, left + iconOffset, top + iconOffset);
      }
    }
  }