Package org.spoutcraft.api.gui

Examples of org.spoutcraft.api.gui.Color


    GL11.glPushMatrix();
    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(770, 771);
    GL11.glDepthMask(false);
    bindColor(new Color(1.0F, 1.0F, 1.0F));
    SpoutClient.getHandle().renderEngine.bindTexture(textureId);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
    double tLeft = 0, tTop = 0, rWidth = bitmap.getWidth(), rHeight = bitmap.getHeight(), tWidth = rWidth, tHeight = rHeight;
    if (top >= 0 && left >= 0) {
View Full Code Here


      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);
      if (!checkBox.isChecked()) {
        color.setAlpha(0.2F);
      } else {
        color.setRed(0).setGreen(1).setBlue(0);
      }
      drawTexture(checkBoxCross, 20, 20, color, true);
      font.drawString(checkBox.getText(), 22, 7, getColor(checkBox).toInt());
    }
  }
View Full Code Here

      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);
      if (!radioButton.isSelected()) {
        color.setAlpha(0.2F);
      }
      drawTexture(radio, 20, 20, color, true);
      font.drawString(radioButton.getText(), 22, 7, getColor(radioButton).toInt());
    }
  }
View Full Code Here

        x += 2 + w;
      }
    }
    FontRenderer font = SpoutClient.getHandle().fontRenderer;
    font.drawString(lwi.getTitle(), x + 2, y + 2, new Color(1.0F, 1.0F, 1.0F).toInt());
    font.drawString(lwi.getText(), x + 2, y + 2 + 8, new Color(0.8F, 0.8F, 0.8F).toInt());
  }
View Full Code Here

      double p = (double) scrollTop / (double) gs.getMaximumScrollPosition(Orientation.VERTICAL);
      scrollY = 3 + p * (gs.getViewportSize(Orientation.VERTICAL) - 16.0 - 6);
      RenderUtil.drawGradientRectangle((int) gs.getWidth() - 16, 0, (int) gs.getWidth(), (int) gs.getHeight(), scrollBarColor.toInt(), scrollBarColor2.toInt());
      GL11.glColor3f(1.0f, 1.0f, 1.0f);
      RenderUtil.drawTexturedModalRectangle((int) (gs.getWidth() - 16), (int) scrollY, 232, 0, 12, 15, 0f);
      RenderUtil.drawGradientRectangle(0, -1, (int) gs.getWidth(), 5, new Color(0.0F, 0.0F, 0.0F, 1.0F).toInt(), new Color(0.0F, 0.0F, 0.0F, 0.0F).toInt());
      RenderUtil.drawGradientRectangle(0, (int) gs.getHeight() - 5, (int) gs.getWidth() + 1, (int) gs.getHeight(), new Color(0.0F, 0.0F, 0.0F, 0.0F).toInt(), new Color(0.0F, 0.0F, 0.0F, 1.0F).toInt());
    }
  }
View Full Code Here

    for (ListWidgetItem item : lw.getItems()) {
      // Only render visible items
      if (currentHeight >= scrollTop - item.getHeight() && currentHeight <= scrollBottom) {
        // Draw selection border
        if (lw.isSelected(item)) {
          RenderUtil.drawRectangle(4, currentHeight - 1, lw.getViewportSize(Orientation.HORIZONTAL) - 3, currentHeight - 1 + item.getHeight() + 2, new Color(1.0F, 1.0F, 1.0F).toInt());
          RenderUtil.drawRectangle(5, currentHeight, lw.getViewportSize(Orientation.HORIZONTAL) - 4, currentHeight + item.getHeight(), new Color(0.0F, 0.0F, 0.0F).toInt());
        }

        // Render actual item
        GL11.glPushMatrix();
        item.render(5, currentHeight, lw.getViewportSize(Orientation.HORIZONTAL) - 9, item.getHeight());
View Full Code Here

  private GenericLabel labelText = new GenericLabel();

  public TextSection() {
    labelText.setWidth(100);
    labelText.setWrapLines(true);
    labelText.setTextColor(new Color(0xaaaaaa));
  }
View Full Code Here

      });
      image.url = attr.get("website");
      image.texture.setTooltip(attr.get("tooltip"));
      if (attr.containsKey("description") && !attr.get("description").isEmpty()) {
        image.description = new GenericLabel(attr.get("description"));
        image.description.setTextColor(new Color(0xaaaaaa));
      }
      this.images.add(image);

      // TODO Description
    }
View Full Code Here

  private int height = 0;
  protected class Row {
    public GenericLabel caption = new GenericLabel("aasdasd");
    public GenericLabel text = new GenericLabel("basdasd");
    public Row() {
      caption.setTextColor(new Color(0xaaaaaa));
      caption.setWidth(20);
      caption.setWrapLines(true);
      text.setTextColor(new Color(0xaaaaaa));
      text.setWidth(20);
      text.setWrapLines(true);
    }
View Full Code Here

    doneButton.setX(right).setY(height - 25);
    doneButton.setHeight(20).setWidth(150);
    getScreen().attachWidget("Spoutcraft", doneButton);

    int top = 5;
    final Color grey = new Color(0.80F, 0.80F, 0.80F, 0.65F);

    label = new GenericLabel("Minimap Position");
    size = Spoutcraft.getMinecraftFont().getTextWidth(label.getText());
    label.setX((int) (width / 2 - size / 2)).setY(top);
    label.setTextColor(grey);
View Full Code Here

TOP

Related Classes of org.spoutcraft.api.gui.Color

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.