Пример #1
0
  @Override
  public void draw(ScaledResolution sr) {
    double width = sr.getScaledWidth_double(), height = sr.getScaledHeight_double();

    AppFreqTransmitter app = AppFreqTransmitter.instance;
    GL11.glPushMatrix();
    {
      GL11.glTranslated(15, 15, 0);

      final float isize = 18;
      final float fsize = 10;
      String str = app.getDisplayName();
      double len = Font.font.strLen(str, fsize);

      drawBox(0, 0, 30 + len, 18);

      ResourceLocation icon = app.getIcon();
      RenderUtils.loadTexture(icon);
      GL11.glColor4d(1, 1, 1, 1);
      HudUtils.rect(2, 0, isize, isize);

      Font.font.draw(str, isize + 6, 4, fsize, 0xffffff);
    }
    GL11.glPopMatrix();

    current.handleDraw(width, height);

    GL11.glColor4d(1, 1, 1, 1);
  }
Пример #2
0
  private static void drawBox(double x, double y, double width, double height) {
    BG_COLOR.bind();
    HudUtils.colorRect(x, y, width, height);

    ACRenderingHelper.drawGlow(x, y, width, height, GLOW_SIZE, GLOW_COLOR);
  }