Examples of GenericTexture


Examples of org.getspout.spoutapi.gui.GenericTexture

   * @param diff
   *            Wert, aus dem die neue Position errechnet wird
   */
  public static void paintBlueArrow(int diff, SpoutPlayer player) {

    GenericTexture arrowTop = ConflictPlugin.arrowTopBlue.get(player);
    GenericTexture arrowBot = ConflictPlugin.arrowBotBlue.get(player);
    GenericTexture arrowLeft = ConflictPlugin.arrowLeftBlue.get(player);
    GenericTexture arrowRight = ConflictPlugin.arrowRightBlue.get(player);

    if (showArrowBlue.get(player) == false) {
      arrowTop.setVisible(false);
      arrowLeft.setVisible(false);
      arrowRight.setVisible(false);
      arrowBot.setVisible(false);
      return;
    }

    if (diff == 1000) {
      arrowTop.setVisible(false);
      arrowLeft.setVisible(false);
      arrowRight.setVisible(false);
      arrowBot.setVisible(false);
      return;
    }

    // top
    if (0 <= diff && diff <= 45) {
      arrowTop.setVisible(true);
      arrowTop.setX(diff * player.getMainScreen().getWidth() / 90);
      arrowLeft.setVisible(false);
      arrowRight.setVisible(false);
      arrowBot.setVisible(false);
    } else if (315 <= diff) {
      arrowTop.setVisible(true);
      arrowTop.setX(-(360 - diff) * player.getMainScreen().getWidth() / 90);
      arrowLeft.setVisible(false);
      arrowRight.setVisible(false);
      arrowBot.setVisible(false);
    } else

    // rechts
    if (diff > 45 && diff <= 135) {
      arrowTop.setVisible(false);
      arrowLeft.setVisible(false);
      arrowRight.setVisible(true);
      arrowRight.setY((diff - 90) * player.getMainScreen().getHeight() / 90);
      arrowBot.setVisible(false);
    } else
    // links
    if (diff < 315 && diff >= 225) {
      arrowTop.setVisible(false);
      arrowLeft.setVisible(true);
      arrowLeft.setY((270 - diff) * player.getMainScreen().getHeight() / 90);
      arrowRight.setVisible(false);
      arrowBot.setVisible(false);
      // bot
    } else {
      arrowTop.setVisible(false);
      arrowLeft.setVisible(false);
      arrowRight.setVisible(false);
      arrowBot.setVisible(true);
    }
  }
View Full Code Here

Examples of org.getspout.spoutapi.gui.GenericTexture

   * @param player
   *            Spieler f�r den die GUI aktualisiert wird
   */
  public static void paintAlarmLamp(boolean isOn, SpoutPlayer player) {

    GenericTexture alarmLamp = ConflictPlugin.alarmLamps.get(player);
    if (isOn) {
      alarmLamp.setVisible(true);
    } else {
      alarmLamp.setVisible(false);
    }
  }
View Full Code Here

Examples of org.getspout.spoutapi.gui.GenericTexture

   * @param player
   *            Spieler f�r den die GUI aktualisiert wird
   */
  public static void paintInEnemyBaseLamp(boolean isOn, SpoutPlayer player) {

    GenericTexture alarmLamp = ConflictPlugin.enemyBaseLamps.get(player);
    if (isOn) {
      alarmLamp.setVisible(true);
    } else {
      alarmLamp.setVisible(false);
    }
  }
View Full Code Here

Examples of org.getspout.spoutapi.gui.GenericTexture

   * @param player
   *            Spieler f�r den die GUI aktualisiert wird
   */
  public static void paintInOwnBaseLamp(boolean isOn, SpoutPlayer player) {

    GenericTexture alarmLamp = ConflictPlugin.ownBaseLamps.get(player);
    if (isOn) {
      alarmLamp.setVisible(true);
    } else {
      alarmLamp.setVisible(false);
    }
  }
View Full Code Here

Examples of org.getspout.spoutapi.gui.GenericTexture

//    SelectorButton general = new SelectorButton( SelectorType.GENERAL, body);
//    SelectorButton rules = new SelectorButton( SelectorType.RULES, body);
//    SelectorButton commands = new SelectorButton( SelectorType.COMMANDS, body);
//    SelectorButton ranks = new SelectorButton( SelectorType.RANKS, body);
    ExitButton exit = new ExitButton();
    GenericTexture icons = new GenericTexture();
    GenericTexture background = new GenericTexture();

    // Button Icons
    icons.setX(x+7).setY(y+17);
    icons.setWidth(326).setHeight(20);
    icons.setUrl("https://github.com/LimeByte/SpoutHelp/raw/master/images/icons.png");
    icons.setPriority(RenderPriority.Normal);

    // Buttons
//    general.setMarginRight(4).setFixed(true);
//    rules.setMarginRight(4).setFixed(true);
//    commands.setMarginRight(4).setFixed(true);
//    ranks.setFixed(true);
    exit.setMarginLeft(214).setFixed(true);

    // Button Container
    //buttons.addChildren(general, rules, commands, ranks, exit);
    buttons.setX(x+7).setY(y+17);
    buttons.setWidth(326).setHeight(20);
    buttons.setLayout(ContainerType.HORIZONTAL);
    buttons.setAuto(false);
   
    buttons.setPriority(RenderPriority.High);

    // GUI Title
    title.setText("Skills");
    title.setX(x+7).setY(y+5);
    title.setWidth(100).setHeight(20);
    title.setFixed(false);
    title.setPriority(RenderPriority.High);

    // Body Text
    body.setX(x+10).setY(y+44);
    body.setWidth(320).setHeight(136);
    //body.setText(general.getTopicText());
    body.setDirty(true);
    body.setPriority(RenderPriority.High);

    // Copyright Text
    copyright.setTextColor(new Color("8B8B8B"));
    copyright.setShadow(false);
    copyright.setX(x+284).setY(y+186);
    copyright.setWidth(100).setHeight(18);
    copyright.setFixed(false);
    copyright.setText("SpoutHelp");
    copyright.setPriority(RenderPriority.High);

    // Main GUI
    background.setX(x).setY(y);
    background.setWidth(340).setHeight(200);
    background.setFixed(false);
   
    background.setUrl(guiBackground);
   
   
    background.setPriority(RenderPriority.Highest);

    // Attach Widgets
    this.setTransparent(true);
    this.attachWidget(plugin, background);
    this.attachWidget(plugin, title);
View Full Code Here

Examples of org.spoutcraft.api.gui.GenericTexture

    labels.add(labelSpoutcraftLabel);

    labelSpoutcraft = new GenericLabel("...");
    labelSpoutcraft.setTextColor(new Color(0xffaaaaaa));
    content.attachWidget("Spoutcraft", labelSpoutcraft);
    textureIcon = new GenericTexture("http://cdn.spout.org/server/thumb/" + item.getDatabaseId() + ".png");
    textureIcon.setFinishDelegate(new ImageUpdate());
    textureIcon.setWidth(48).setHeight(48);
    content.attachWidget("Spoutcraft", textureIcon);

    for (GenericLabel lbl:labels) {
View Full Code Here

Examples of org.spoutcraft.api.gui.GenericTexture

  public void setupGallery() {
    buttonGalleryNext = new GenericButton("->");
    buttonGalleryPrev = new GenericButton("<-");
    labelGalleryImageTitle = new GenericLabel();
    labelGalleryImageDesc = new GenericLabel();
    textureGalleryImage = new GenericTexture("");
    textureGalleryImage.setFinishDelegate(new ImageUpdate());
    labelGalleryTitle = new GenericLabel("Gallery");
    ((GenericLabel) labelGalleryImageDesc).setWrapLines(true);
    content.attachWidgets("Spoutcraft", labelGalleryImageTitle, labelGalleryImageDesc, textureGalleryImage, buttonGalleryPrev, buttonGalleryNext, labelGalleryTitle);
    layoutWidgets();
View Full Code Here

Examples of org.spoutcraft.api.gui.GenericTexture

    HashMap<String, Object> images = (HashMap<String, Object>) yaml;
    for (Object img:images.values()) {
      HashMap<String, String> attr = (HashMap<String, String>) img;
      Image image = new Image();
      image.texture = new GenericTexture(attr.get("image"));
      image.texture.setFinishDelegate(new Runnable() {
        @Override
        public void run() {
          screen.update();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.