Package org.newdawn.slick.opengl

Examples of org.newdawn.slick.opengl.Texture


  }

  public void render(GenericCheckBox checkBox) {
    if (checkBox.isVisible()) {
      GL11.glAlphaFunc(GL11.GL_GREATER, 0.01F);
      Texture checkBoxCross = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath()+"/ui/box_check.png");
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glTranslatef((float) Math.floor(checkBox.getScreenX()), (float) Math.floor(checkBox.getScreenY()), 0);
      renderBaseBox(checkBox, true);
      FontRenderer font = SpoutClient.getHandle().fontRenderer;
      Color color = getColor(checkBox);
View Full Code Here


    }
  }

  public void render(GenericRadioButton radioButton) {
    if (radioButton.isVisible()) {
      Texture radio = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath()+"/ui/box_radio.png");
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glTranslatef((float) Math.floor(radioButton.getScreenX()), (float) Math.floor(radioButton.getScreenY()), 0);
      renderBaseBox(radioButton, true);
      FontRenderer font = SpoutClient.getHandle().fontRenderer;
      Color color = getColor(radioButton);
View Full Code Here

  public void renderBaseBox(Control box) {
    renderBaseBox(box, false);
  }

  public void renderBaseBox(Control box, boolean blend) {
    Texture usedTexture = null;
    if (box.isEnabled() && isHovering(box)) {
      usedTexture = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath()+"/ui/box_hover.png");
    } else if (box.isEnabled()) {
      usedTexture = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath()+"/ui/box_normal.png");
    } else {
View Full Code Here

    GL11.glColor4f(c.getRedF(), c.getGreenF(), c.getBlueF(), c.getAlphaF());
  }

  public void render(GenericListWidgetItem lwi, int x, int y, int width, int height) {
    if (lwi.getIconUrl() != null && !lwi.getIconUrl().isEmpty()) {
      Texture t = CustomTextureManager.getTextureFromUrl(lwi.getIconUrl());
      if (t != null) {
        int maxHeight = height - 4;
        float f = (float) t.getImageWidth() / (float) t.getImageHeight();
        int w = (int) (maxHeight * f);
        GL11.glTranslated(6, (y+2), 0);
        drawTexture(t, maxHeight, w);
        GL11.glTranslated(-6, (-(y+2)), 0);

View Full Code Here

  public void render(GenericComboBox comboBox) {
    if (comboBox.isVisible()) {
      comboBox.setInnerWidth((int) comboBox.getWidth() - 16);
      render((GenericButton) comboBox);
      Texture text;
      if (comboBox.isOpen()) {
        text = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath()+"/ui/box_ascending.png");
      } else {
        text = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath()+"/ui/box_descending.png");
      }
View Full Code Here

    if (isHovering(genericSlot)) RenderUtil.drawRectangle(0, 0, 16, 16, 0x88ffffff);
    GL11.glPopMatrix();
  }

  public boolean bindTexture(String path) {
    Texture tex = CustomTextureManager.getTextureFromPath(path);
    if (tex != null) {
      tex.bind();
    }
    return tex != null;
  }
View Full Code Here

    }
    return tex != null;
  }

  public boolean bindTexture(String addon, String path) {
    Texture tex = CustomTextureManager.getTextureFromUrl(addon, path);
    if (tex != null) {
      tex.bind();
    }
    return tex != null;
  }
View Full Code Here

  }

  @Override
  public void render() {
    GL11.glTranslatef(getX(), getY(), 0);
    Texture t = CustomTextureManager.getTextureFromPath(getUrl());
    if (t != null) {
      MCRenderDelegate d = (MCRenderDelegate) Spoutcraft.getRenderDelegate();
      d.drawTexture(t, (int) getWidth(), (int) getHeight(), isDrawingAlphaChannel());
    }
  }
View Full Code Here

    }
  }

  @Override
  public org.spoutcraft.api.gui.Texture setUrl(String url) {
    Texture t = CustomTextureManager.getTextureFromPath(url);
    if (t != null) {
      setOriginalHeight(t.getImageHeight());
      setOriginalWidth(t.getImageWidth());
    }
    return super.setUrl(url);
  }
View Full Code Here

      if (isSelected() && topdown || !isSelected() && preferredOrder) {
        texture = "/ui/box_ascending.png";
      } else {
        texture = "/ui/box_descending.png";
      }
      Texture direction = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath() + texture);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glTranslatef((float) getScreenX(), (float) getScreenY(), 0);
      r.renderBaseBox(this, true);
      FontRenderer font = SpoutClient.getHandle().fontRenderer;
      Color color = r.getColor(this);
View Full Code Here

TOP

Related Classes of org.newdawn.slick.opengl.Texture

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.