Package org.spoutcraft.api.gui

Examples of org.spoutcraft.api.gui.Color


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


    resources = new GenericButton(translate.translateKey("options.resourcepack"));
    resources.setGeometry(width - 110, height - 105, 100, 20);

    buildNumber = new GenericLabel(SpoutClient.getSpoutcraftVersion() + SpoutClient.getSpoutcraftBuild());   
    textWidth = Spoutcraft.getRenderDelegate().getMinecraftFont().getTextWidth(buildNumber.getText());
    buildNumber.setTextColor(new Color(0x6CC0DC));
    buildNumber.setGeometry(Math.min(90 - textWidth, width - 296 - textWidth), height - 99, 75, 20);

    about = new GenericButton("About");
    about.setGeometry(Math.min(98, width - 288), height - 105, 51, 20);

    options = new GenericButton(translate.translateKey("menu.options"));
    options.setGeometry(Math.min(159, width - 227), height - 105, 51, 20);

    quit = new GenericButton(translate.translateKey("menu.quit"));
    quit.setGeometry(Math.min(220, width - 166), height - 105, 61, 20);

    background.setGeometry(0, 0, width, height);
    background.setPriority(RenderPriority.Highest);
    background.setAnchor(WidgetAnchor.TOP_LEFT);
    background.setLocal(true);

    splashText.setGeometry(Math.min(100, width - 245), height - 135, 200, 12);
    splashText.setTextColor(new Color(0x6CC0DC));
    textWidth = Spoutcraft.getRenderDelegate().getMinecraftFont().getTextWidth(splashText.getText());
    float scale = ((width - 225F) / textWidth);
    splashText.setScale(Math.min(1.5F, scale));

    logo = new ScaledTexture(FileUtil.getAssetsDir().getPath()+"/logo/spoutcraft.png");
    ((ScaledTexture) logo).setScale(Math.min(1F, (width - 135F) / 256F));
    logo.setGeometry(15, height - 185, 256, 64);
    logo.setLocal(true);
    logo.setDrawAlphaChannel(true);

    animate = new GenericLabel(ChatColor.ITALIC + "Animate");
    textWidth = Spoutcraft.getRenderDelegate().getMinecraftFont().getTextWidth(animate.getText());
    textWidth *= 75;
    textWidth /= 100;
    animate.setGeometry(width - textWidth - 2, height - 8, textWidth, 10);
    animate.setScale(0.75F);
    switch (Configuration.getMainMenuState()) {
      case 1:
        animate.setTextColor(new Color(0x00EE00));
        break;
      case 2:
        animate.setTextColor(new Color(0xFFFF00));
        break;
      case 3:
        animate.setTextColor(new Color(0xFF0000));
        break;
    }

    debugText = new GenericLabel();
    debugText.setTextColor(new Color(0xFFE303));
    debugText.setGeometry(1, 1, 12, 100);
    debugText.setVisible(false);
    this.getScreen().attachWidgets("Spoutcraft", singleplayer, multiplayer, resources, buildNumber, background, splashText, about, options,  logo, quit, animate, debugText);
  }
View Full Code Here

        Configuration.setMainMenuState(1);
      }
      Configuration.write();
      switch (Configuration.getMainMenuState()) {
        case 1:
          animate.setTextColor(new Color(0x00EE00));
          break;
        case 2:
          animate.setTextColor(new Color(0xFFFF00));
          break;
        case 3:
          animate.setTextColor(new Color(0xFF0000));
          break;
      }
      clickDelay = CLICK_DELAY;
    }
View Full Code Here

    } else {
      getScreen().attachWidgets("Spoutcraft", map, title, buttonDone, buttonZoomIn, buttonZoomOut, buttonShowPlayer, buttonReset, buttonSave, buttonDeathpoints);
    }

    hoverMenu = new GenericScrollArea();
    hoverMenu.setBackgroundColor(new Color(0x55ffffff));
    hoverMenu.setPriority(RenderPriority.Lowest);
    menuTitle = new GenericLabel("What do you want to do?");
    buttonWaypoint = new GenericButton("Add Waypoint");
    buttonFocus = new GenericButton("Set Focus");
    buttonFocus.setTooltip("If a waypoint is in focus, the direction\nto it will be drawn on the minimap.");
View Full Code Here

    if (btn == buttonReset) {
      map.reset();
    }
    if (btn == buttonSave) {
      if (map.saveToDesktop()) {
        Label label = new FadingLabel("Saved to Desktop!", 500).setTextColor(new Color(0x7FFF00));
        label.setGeometry(width / 2 - Spoutcraft.getMinecraftFont().getTextWidth(label.getText()) / 2, height / 2, 100, 12);
        getScreen().attachWidgets("Spoutcraft", label);
      } else {
        Label label = new FadingLabel("Failed to save Minimap!", 500).setTextColor(new Color(0xEE0000));
        label.setGeometry(width / 2 - Spoutcraft.getMinecraftFont().getTextWidth(label.getText()) / 2, height / 2, 100, 12);
        getScreen().attachWidgets("Spoutcraft", label);
      }
    }
    if (btn == buttonDeathpoints) {
View Full Code Here

  /**
   * Return Vec3D with biome specific fog color
   */
  public Vec3 getFogColor(float par1, float par2) {
    // Spout Start
    Color fogColor = SpoutClient.getInstance().getSkyManager().getFogColor();
    if (fogColor != null) {
      return Vec3.createVectorHelper(fogColor.getRedF(), fogColor.getGreenF(), fogColor.getBlueF());
    } else {
    // MCPatcher Start
    return this.worldObj.getWorldVec3Pool().getVecFromPool((double)ColorizeWorld.netherFogColor[0], (double)ColorizeWorld.netherFogColor[1], (double)ColorizeWorld.netherFogColor[2]);
    // MCPatcher End
    }
View Full Code Here

      float var3 = (float)var2.xCoord;
      float var4 = (float)var2.yCoord;
      float var5 = (float)var2.zCoord;

      // Spout Start
      Color skyColor = SpoutClient.getInstance().getSkyManager().getSkyColor();
      if (skyColor != null) {
        var3 = skyColor.getRedF();
        var4 = skyColor.getGreenF();
        var5 = skyColor.getBlueF();
      }
      // Spout End

      float var8;
View Full Code Here

    Vec3 var15 = this.theWorld.getCloudColour(par1);
    float var16 = (float)var15.xCoord;
    float var17 = (float)var15.yCoord;
    float var18 = (float)var15.zCoord;
    // Spout Start
    Color cloudColor = SpoutClient.getInstance().getSkyManager().getCloudColor();
    if (cloudColor != null) {
      var16 = cloudColor.getRedF();
      var17 = cloudColor.getGreenF();
      var18 = cloudColor.getBlueF();
    }
    // Spout End
    float var19;
    float var21;
    float var20;
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.