Package org.getspout.spoutapi.gui

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


   * @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

   * @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

   * @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

//    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

TOP

Related Classes of org.getspout.spoutapi.gui.GenericTexture

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.