Package org.getspout.spoutapi.gui

Examples of org.getspout.spoutapi.gui.GenericPopup


    int screenWidth = player.getMainScreen().getWidth();
    int screenHeight = player.getMainScreen().getHeight();
    int x = (screenWidth / 2) - 185;
    int y = (screenHeight / 2);

    GenericPopup popup = new GenericPopup();

    GenericContainer container = new GenericContainer();

    GenericButton button1 = new GenericButton("Fight");
    button1.setAnchor(WidgetAnchor.CENTER_LEFT);
    button1.setWidth(80).setHeight(20).setMarginLeft(10).setFixed(true);

    GenericButton button2 = new GenericButton("Craft");
    button2.setAnchor(WidgetAnchor.CENTER_LEFT);
    button2.setWidth(80).setHeight(20).setMarginLeft(10).setFixed(true);

    GenericButton button3 = new GenericButton("Mine");
    button3.setAnchor(WidgetAnchor.CENTER_LEFT);
    button3.setWidth(80).setHeight(20).setMarginLeft(10).setFixed(true);

    GenericButton button4 = new GenericButton("Food");
    button4.setAnchor(WidgetAnchor.CENTER_LEFT);
    button4.setWidth(80).setHeight(20).setMarginLeft(10).setMarginRight(10).setFixed(true);

    container.addChildren(button1, button2, button3, button4);
    container.setX(x).setY(y);
    container.setWidth(370).setHeight(20);
    container.setAuto(false);
    container.setLayout(ContainerType.HORIZONTAL);

    popup.attachWidget(plugin, container);
    player.getMainScreen().attachPopupScreen(popup);

  }
View Full Code Here


   * paints the overlay containing the two buttons
   * @param player Player for which the overlay is painted
   */
  public void createOverlay(SpoutPlayer player) {
      
        GenericPopup popup = new GenericPopup();
       
  
        GenericButton button1 = new GenericButton("Team RED");
        button1.setAnchor(WidgetAnchor.CENTER_CENTER);
        button1.setWidth(100).setHeight(20);
        button1.shiftXPos(-button1.getWidth()-5).shiftYPos(button1.getHeight()/2);
  
        GenericButton button2 = new GenericButton("Team BLUE");
        button2.setAnchor(WidgetAnchor.CENTER_CENTER);
        button2.setWidth(100).setHeight(20);
        button2.shiftXPos(5).shiftYPos(button1.getHeight()/2);
  
      
        popup.attachWidget(plugin, button1);
        popup.attachWidget(plugin, button2);
        player.getMainScreen().attachPopupScreen(popup);
       
    }
View Full Code Here

    int screenWidth = player.getMainScreen().getWidth();
    int screenHeight = player.getMainScreen().getHeight();
    int x = (screenWidth / 2) - 200;
    int y = (screenHeight / 2) - 65;

    GenericPopup popup = new GenericPopup();

    GenericContainer container = new GenericContainer();
    GenericContainer layer1Skills = new GenericContainer();
    GenericContainer layer2Skills = new GenericContainer();
    GenericContainer layer3Skills = new GenericContainer();

    GenericContainer layer1Arrows = new GenericContainer();
    GenericContainer layer2Arrows = new GenericContainer();

    SkillButton b1 = new SkillButton("Move. 1", 80, 20, 0, 0, 5, ConflictPlugin.skillFightSpeedLand, 1, null, 0,
        player, "Erhoeht Bewegungsgeschwindigkeit um 20%");
    SkillButton b2 = new SkillButton("Jump", 80, 20, 0, 0, 5, ConflictPlugin.skillFightJump, 1,
        ConflictPlugin.skillFightSpeedLand, 1, player, "Erhoeht Sprunghoehe auf 2 Felder");
    SkillButton b5 = new SkillButton("Move. 2", 80, 20, 0, 0, 10, ConflictPlugin.skillFightSpeedLand, 2,
        ConflictPlugin.skillFightJump, 1, player, "Erhoeht Bewegungsgeschwindigkeit um (insgesamt) 40%");
    SkillButton b6 = new SkillButton("Fight 1", 280, 20, 40, 0, 5, ConflictPlugin.skillFightMonsters, 1, null, 0,
        player, "+1 Schaden gegen Monster (nicht im Nether)");
    SkillButton b7 = new SkillButton("Fight 2", 80, 20, 20, 0, 5, ConflictPlugin.skillFightMonsters, 2,
        ConflictPlugin.skillFightMonsters, 1, player, "+2 Schaden gegen Monster (nicht im Nether)");
    SkillButton b8 = new SkillButton("Def. 1", 80, 20, 20, 0, 5, ConflictPlugin.skillFightArmor, 1,
        ConflictPlugin.skillFightMonsters, 1, player, "-1 Schaden von Monstern und Gegnern");
    SkillButton b9 = new SkillButton("Dam. 1", 80, 20, 40, 0, 5, ConflictPlugin.skillFightDamage, 1,
        ConflictPlugin.skillFightMonsters, 1, player, "+1 Schaden gegen alles");
    SkillButton b10 = new SkillButton("Reg. 1", 80, 20, 20, 0, 10, ConflictPlugin.skillFightRegeneration, 1,
        ConflictPlugin.skillFightArmor, 1, player, "1/2 Herz Regeneration pro "
            + ConflictPlugin.skillRegenerationIntervall + "s (auch wenn Hungerbalken nicht voll)");
    SkillButton b11 = new SkillButton("Camp 1", 80, 20, 40, 0, 10, ConflictPlugin.skillFightCamp, 1,
        ConflictPlugin.skillFightMonsters, 2, player,
        "Verdoppelt den Camping-Treshold (d.h. man kann doppelt so lange im gegn. Gebiet bleiben)");
    SkillButton b12 = new SkillButton("Ender", 80, 20, 20, 0, 10, ConflictPlugin.skillFightDrop, 1,
        ConflictPlugin.skillFightMonsters, 2, player, "Endermen droppen immer eine EnderPearl)");

    GenericTexture t1 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t1.setWidth(16).setHeight(16).setMarginLeft(32).setFixed(true);
    GenericTexture t2 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t2.setWidth(16).setHeight(16).setMarginLeft(104).setFixed(true);
    GenericTexture t3 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t3.setWidth(16).setHeight(16).setMarginLeft(84).setFixed(true);
    GenericTexture t4 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t4.setWidth(16).setHeight(16).setMarginLeft(84).setFixed(true);
    GenericTexture t5 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t5.setWidth(16).setHeight(16).setMarginLeft(32).setFixed(true);
    GenericTexture t6 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t6.setWidth(16).setHeight(16).setMarginLeft(104).setFixed(true);
    GenericTexture t7 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t7.setWidth(16).setHeight(16).setMarginLeft(84).setFixed(true);
    GenericTexture t8 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t8.setWidth(16).setHeight(16).setMarginLeft(84).setFixed(true);

    container.addChildren(layer1Skills, layer1Arrows, layer2Skills, layer2Arrows, layer3Skills);
    container.setX(x).setY(y);
    container.setWidth(400).setHeight(125);
    container.setAuto(false);
    container.setLayout(ContainerType.VERTICAL);

    layer1Arrows.addChildren(t1, t2, t3, t4);
    // layer1Arrows.setX(x).setY(y);
    layer1Arrows.setWidth(400).setHeight(25);
    layer1Arrows.setAuto(false);
    layer1Arrows.setLayout(ContainerType.HORIZONTAL);

    layer1Skills.addChildren(b1.button, b6.button);
    // layer1Skills.setX(x).setY(y);
    layer1Skills.setWidth(400).setHeight(25);
    layer1Skills.setLayout(ContainerType.HORIZONTAL);
    layer1Skills.setAuto(false);

    layer2Skills.addChildren(b2.button, b9.button, b7.button, b8.button);
    // layer2Skills.setX(x).setY(y);
    layer2Skills.setWidth(400).setHeight(25);
    layer2Skills.setLayout(ContainerType.HORIZONTAL);
    layer2Skills.setAuto(false);

    layer2Arrows.addChildren(t5, t6, t7, t8);
    // layer2Arrows.setX(x).setY(y);
    layer2Arrows.setWidth(400).setHeight(25);
    layer2Arrows.setAuto(false);
    layer2Arrows.setLayout(ContainerType.HORIZONTAL);

    layer3Skills.addChildren(b5.button, b11.button, b12.button, b10.button);
    // layer3Skills.setX(x).setY(y);
    layer3Skills.setWidth(400).setHeight(25);
    layer3Skills.setLayout(ContainerType.HORIZONTAL);
    layer3Skills.setAuto(false);

    // popup.setX(10).setY(10);

    // SkillGUI sk = new SkillGUI(player, "Skills", "https://github.com/LimeByte/SpoutHelp/raw/master/images/background.png");
    // player.getMainScreen().attachPopupScreen(sk);

    popup.attachWidget(plugin, container);
    player.getMainScreen().attachPopupScreen(popup);

  }
View Full Code Here

    int screenWidth = player.getMainScreen().getWidth();
    int screenHeight = player.getMainScreen().getHeight();
    int x = (screenWidth / 2) - 200;
    int y = (screenHeight / 2) - 65;

    GenericPopup popup = new GenericPopup();

    GenericContainer container = new GenericContainer();
    GenericContainer layer1Skills = new GenericContainer();
    GenericContainer layer2Skills = new GenericContainer();
    GenericContainer layer3Skills = new GenericContainer();
    GenericContainer layer4Skills = new GenericContainer();

    GenericContainer layer1Arrows = new GenericContainer();
    GenericContainer layer2Arrows = new GenericContainer();
    GenericContainer layer3Arrows = new GenericContainer();

    GenericTexture t1 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t1.setWidth(16).setHeight(16).setMarginLeft(192).setFixed(true);

    GenericTexture t2 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t2.setWidth(16).setHeight(16).setMarginLeft(38).setFixed(true);
    GenericTexture t3 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t3.setWidth(16).setHeight(16).setMarginLeft(89).setFixed(true);
    GenericTexture t4 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t4.setWidth(16).setHeight(16).setMarginLeft(89).setFixed(true);
    GenericTexture t5 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t5.setWidth(16).setHeight(16).setMarginLeft(89).setFixed(true);

    GenericTexture t6 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t6.setWidth(16).setHeight(16).setMarginLeft(38).setFixed(true);
    GenericTexture t7 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t7.setWidth(16).setHeight(16).setMarginLeft(89).setFixed(true);
    GenericTexture t8 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t8.setWidth(16).setHeight(16).setMarginLeft(89).setFixed(true);
    GenericTexture t9 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t9.setWidth(16).setHeight(16).setMarginLeft(89).setFixed(true);

    SkillButton b1 = new SkillButton("Durability 1", 400, 20, 0, 0, 4, ConflictPlugin.skillCraftQual, 1, null, 0,
        player, "Waffen/Bogen/Ruestung/Werkzeuge wird mit 75% Haltbarkeit gecraftet (normal 50%)");
    SkillButton b2 = new SkillButton("Durability 2", 400, 20, 0, 0, 4, ConflictPlugin.skillCraftQual, 2,
        ConflictPlugin.skillCraftQual, 1, player,
        "Waffen/Bogen/Ruestung/Werkzeuge wird mit 100% Haltbarkeit gecraftet (normal 50%)");
    SkillButton b3 = new SkillButton("Bow 1", 85, 20, 0, 0, 5, ConflictPlugin.skillCraftBow, 1,
        ConflictPlugin.skillCraftQual, 2, player, "Boegen erhalten Verzauberung ");
    SkillButton b4 = new SkillButton("Sword 1", 85, 20, 20, 0, 5, ConflictPlugin.skillCraftSword, 1,
        ConflictPlugin.skillCraftQual, 2, player, "Waffen erhalten Verzauberung");
    SkillButton b5 = new SkillButton("Armor 1", 85, 20, 20, 0, 5, ConflictPlugin.skillCraftArmor, 1,
        ConflictPlugin.skillCraftQual, 2, player, "Ruestungen erhalten Verzauberung");
    SkillButton b6 = new SkillButton("Tools 1", 85, 20, 20, 0, 5, ConflictPlugin.skillCraftTool, 1,
        ConflictPlugin.skillCraftQual, 2, player, "Werkzeuge erhalten Verzauberung");
    SkillButton b7 = new SkillButton("Bow 2", 85, 20, 0, 0, 10, ConflictPlugin.skillCraftBow, 2,
        ConflictPlugin.skillCraftBow, 1, player, "Boegen erhalten staerkere Verzauberung");
    SkillButton b8 = new SkillButton("Sword 2", 85, 20, 20, 0, 10, ConflictPlugin.skillCraftSword, 2,
        ConflictPlugin.skillCraftSword, 1, player, "Schwerter erhalten staerkere Verzauberung");
    SkillButton b9 = new SkillButton("Armor 2", 85, 20, 20, 0, 10, ConflictPlugin.skillCraftArmor, 2,
        ConflictPlugin.skillCraftArmor, 1, player, "Ruestungen erhalten staerkere Verzauberung");
    SkillButton b10 = new SkillButton("Tools 2", 85, 20, 20, 0, 10, ConflictPlugin.skillCraftTool, 2,
        ConflictPlugin.skillCraftTool, 1, player, "Werkzeuge erhalten staerkere Verzauberung");

    container.addChildren(layer1Skills, layer1Arrows, layer2Skills, layer2Arrows, layer3Skills, layer3Arrows,
        layer4Skills);
    container.setX(x).setY(y);
    container.setWidth(400).setHeight(175);
    container.setAuto(false);
    container.setLayout(ContainerType.VERTICAL);

    layer1Arrows.addChildren(t1);
    // layer1Arrows.setX(x).setY(y);
    layer1Arrows.setWidth(400).setHeight(25);
    layer1Arrows.setAuto(false);
    layer1Arrows.setLayout(ContainerType.HORIZONTAL);

    layer1Skills.addChildren(b1.button);
    // layer1Skills.setX(x).setY(y);
    layer1Skills.setWidth(400).setHeight(25);
    layer1Skills.setLayout(ContainerType.HORIZONTAL);
    layer1Skills.setAuto(false);

    layer2Skills.addChildren(b2.button);
    // layer2Skills.setX(x).setY(y);
    layer2Skills.setWidth(400).setHeight(25);
    layer2Skills.setLayout(ContainerType.HORIZONTAL);
    layer2Skills.setAuto(false);

    layer2Arrows.addChildren(t2, t3, t4, t5);
    // layer2Arrows.setX(x).setY(y);
    layer2Arrows.setWidth(400).setHeight(25);
    layer2Arrows.setAuto(false);
    layer2Arrows.setLayout(ContainerType.HORIZONTAL);

    layer3Skills.addChildren(b3.button, b4.button, b5.button, b6.button);
    // layer3Skills.setX(x).setY(y);
    layer3Skills.setWidth(400).setHeight(25);
    layer3Skills.setLayout(ContainerType.HORIZONTAL);
    layer3Skills.setAuto(false);

    layer3Arrows.addChildren(t6, t7, t8, t9);
    // layer2Arrows.setX(x).setY(y);
    layer3Arrows.setWidth(400).setHeight(25);
    layer3Arrows.setAuto(false);
    layer3Arrows.setLayout(ContainerType.HORIZONTAL);

    layer4Skills.addChildren(b7.button, b8.button, b9.button, b10.button);
    // layer3Skills.setX(x).setY(y);
    layer4Skills.setWidth(400).setHeight(25);
    layer4Skills.setLayout(ContainerType.HORIZONTAL);
    layer4Skills.setAuto(false);

    popup.attachWidget(plugin, container);
    player.getMainScreen().attachPopupScreen(popup);

  }
View Full Code Here

    int screenWidth = player.getMainScreen().getWidth();
    int screenHeight = player.getMainScreen().getHeight();
    int x = (screenWidth / 2) - 200;
    int y = (screenHeight / 2) - 65;

    GenericPopup popup = new GenericPopup();

    GenericContainer container = new GenericContainer();
    GenericContainer layer1Skills = new GenericContainer();
    GenericContainer layer2Skills = new GenericContainer();
    GenericContainer layer3Skills = new GenericContainer();
    GenericContainer layer4Skills = new GenericContainer();

    GenericContainer layer1Arrows = new GenericContainer();
    GenericContainer layer2Arrows = new GenericContainer();
    GenericContainer layer3Arrows = new GenericContainer();

    GenericTexture t1 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t1.setWidth(16).setHeight(16).setMarginLeft(192).setFixed(true);
    GenericTexture t2 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t2.setWidth(16).setHeight(16).setMarginLeft(28).setFixed(true);
    GenericTexture t3 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t3.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t4 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t4.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t5 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t5.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t6 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t6.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);

    GenericTexture t7 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t7.setWidth(16).setHeight(16).setMarginLeft(28).setFixed(true);
    GenericTexture t8 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t8.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t9 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t9.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t10 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t10.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t11 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t11.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);

    SkillButton b1 = new SkillButton("Durab 1", 400, 20, 0, 0, 5, ConflictPlugin.skillMineDurab, 1, null, 0,
        player, "Werkzeuge nutzen sich 30% langsamer ab");
    SkillButton b2 = new SkillButton("Durab 2", 400, 20, 0, 0, 5, ConflictPlugin.skillMineDurab, 2,
        ConflictPlugin.skillMineDurab, 1, player, "Werkzeuge nutzen sich 50% langsamer ab");
    SkillButton b3 = new SkillButton("Clay 1", 72, 20, 0, 0, 5, ConflictPlugin.skillMineClay, 1,
        ConflictPlugin.skillMineDurab, 2, player, "50% Chance auf +1 Ressource beim Abbau");
    SkillButton b4 = new SkillButton("Lapis 1", 72, 20, 10, 0, 5, ConflictPlugin.skillMineLapis, 1,
        ConflictPlugin.skillMineDurab, 2, player, "50% Chance auf +1 Ressource beim Abbau");
    SkillButton b5 = new SkillButton("Iron 1", 72, 20, 10, 0, 5, ConflictPlugin.skillMineIron, 1,
        ConflictPlugin.skillMineDurab, 2, player, "50% Chance auf +1 Ressource beim Abbau");
    SkillButton b6 = new SkillButton("Gold 1", 72, 20, 10, 0, 5, ConflictPlugin.skillMineGold, 1,
        ConflictPlugin.skillMineDurab, 2, player, "50% Chance auf +1 Ressource beim Abbau");
    SkillButton b7 = new SkillButton("Diam. 1", 72, 20, 10, 0, 10, ConflictPlugin.skillMineDiamond, 1,
        ConflictPlugin.skillMineDurab, 2, player, "50% Chance auf +1 Ressource beim Abbau");
    // SkillButton b8 = new SkillButton("Redstone 1", 80, 20, 340, 80, 5, ConflictPlugin.skillMineRedstone, 1, ConflictPlugin.skillMineDurab, 2, player);
    SkillButton b8 = new SkillButton("Clay 2", 72, 20, 1, 0, 5, ConflictPlugin.skillMineClay, 2,
        ConflictPlugin.skillMineClay, 1, player, "+1 Ressource beim Abbau");
    SkillButton b9 = new SkillButton("Lapis 2", 72, 20, 10, 0, 5, ConflictPlugin.skillMineLapis, 2,
        ConflictPlugin.skillMineLapis, 1, player, "+1 Ressource beim Abbau");
    SkillButton b10 = new SkillButton("Iron 2", 72, 20, 10, 0, 5, ConflictPlugin.skillMineIron, 2,
        ConflictPlugin.skillMineIron, 1, player, "+1 Ressource beim Abbau");
    SkillButton b11 = new SkillButton("Gold 2", 72, 20, 10, 0, 5, ConflictPlugin.skillMineGold, 2,
        ConflictPlugin.skillMineGold, 1, player, "+1 Ressource beim Abbau");
    SkillButton b12 = new SkillButton("Diam. 2", 72, 20, 10, 0, 10, ConflictPlugin.skillMineDiamond, 2,
        ConflictPlugin.skillMineDiamond, 1, player, "+1 Ressource beim Abbau");

    container.addChildren(layer1Skills, layer1Arrows, layer2Skills, layer2Arrows, layer3Skills, layer3Arrows,
        layer4Skills);
    container.setX(x).setY(y);
    container.setWidth(400).setHeight(175);
    container.setAuto(false);
    container.setLayout(ContainerType.VERTICAL);

    layer1Arrows.addChildren(t1);
    // layer1Arrows.setX(x).setY(y);
    layer1Arrows.setWidth(400).setHeight(25);
    layer1Arrows.setAuto(false);
    layer1Arrows.setLayout(ContainerType.HORIZONTAL);

    layer1Skills.addChildren(b1.button);
    // layer1Skills.setX(x).setY(y);
    layer1Skills.setWidth(400).setHeight(25);
    layer1Skills.setLayout(ContainerType.HORIZONTAL);
    layer1Skills.setAuto(false);

    layer2Skills.addChildren(b2.button);
    // layer2Skills.setX(x).setY(y);
    layer2Skills.setWidth(400).setHeight(25);
    layer2Skills.setLayout(ContainerType.HORIZONTAL);
    layer2Skills.setAuto(false);

    layer2Arrows.addChildren(t2, t3, t4, t5, t6);
    // layer2Arrows.setX(x).setY(y);
    layer2Arrows.setWidth(400).setHeight(25);
    layer2Arrows.setAuto(false);
    layer2Arrows.setLayout(ContainerType.HORIZONTAL);

    layer3Skills.addChildren(b3.button, b4.button, b5.button, b6.button, b7.button);
    // layer3Skills.setX(x).setY(y);
    layer3Skills.setWidth(400).setHeight(25);
    layer3Skills.setLayout(ContainerType.HORIZONTAL);
    layer3Skills.setAuto(false);

    layer3Arrows.addChildren(t7, t8, t9, t10, t11);
    // layer2Arrows.setX(x).setY(y);
    layer3Arrows.setWidth(400).setHeight(25);
    layer3Arrows.setAuto(false);
    layer3Arrows.setLayout(ContainerType.HORIZONTAL);

    layer4Skills.addChildren(b8.button, b9.button, b10.button, b11.button, b12.button);
    // layer3Skills.setX(x).setY(y);
    layer4Skills.setWidth(400).setHeight(25);
    layer4Skills.setLayout(ContainerType.HORIZONTAL);
    layer4Skills.setAuto(false);

    popup.attachWidget(plugin, container);
    player.getMainScreen().attachPopupScreen(popup);

  }
View Full Code Here

    int screenWidth = player.getMainScreen().getWidth();
    int screenHeight = player.getMainScreen().getHeight();
    int x = (screenWidth / 2) - 200;
    int y = (screenHeight / 2) - 65;

    GenericPopup popup = new GenericPopup();

    GenericContainer container = new GenericContainer();
    GenericContainer layer1Skills = new GenericContainer();
    GenericContainer layer2Skills = new GenericContainer();
    GenericContainer layer3Skills = new GenericContainer();

    GenericContainer layer1Arrows = new GenericContainer();
    GenericContainer layer2Arrows = new GenericContainer();

    GenericTexture t1 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t1.setWidth(16).setHeight(16).setMarginLeft(28).setFixed(true);

    GenericTexture t2 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t2.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t3 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t3.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t4 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t4.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t5 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t5.setWidth(16).setHeight(16).setMarginLeft(66).setFixed(true);
    GenericTexture t6 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow11.png");
    t6.setWidth(16).setHeight(16).setMarginLeft(28).setFixed(true);

    GenericTexture t7 = new GenericTexture("http://tossat.de/~mcbukkit/images/Arrow3.png");
    t7.setWidth(16).setHeight(16).setMarginLeft(24).setFixed(true);

    SkillButton b1 = new SkillButton("G3d 1", 400, 20, 0, 0, 5, ConflictPlugin.skillFoodSeed, 1, null, 0,
        player, "Weizen dropt mehr Saatgut");
    SkillButton b2 = new SkillButton("G3d 2", 72, 20, 0, 0, 5, ConflictPlugin.skillFoodHarvest, 1,
        ConflictPlugin.skillFoodSeed, 1, player, "Weizen dropt 50% mehr Nahrung");
    SkillButton b3 = new SkillButton("G3d 3", 72, 20, 0, 0, 5, ConflictPlugin.skillFoodBone, 1,
        ConflictPlugin.skillFoodHarvest, 1, player, "Aus Knochen kann mehr Knochenmehl hergestellt werden");
    SkillButton b4 = new SkillButton("Chicken 1", 72, 20, 10, 0, 5, ConflictPlugin.skillFoodChicken, 1,
        ConflictPlugin.skillFoodSeed, 1, player, "H�hner droppen mehr Fleisch (+1)");
    SkillButton b5 = new SkillButton("Cow 1", 72, 20, 10, 0, 5, ConflictPlugin.skillFoodCow, 1,
        ConflictPlugin.skillFoodSeed, 1, player, "K�he droppen mehr Fleisch (+1)");
    SkillButton b6 = new SkillButton("Fish 1", 72, 20, 10, 0, 5, ConflictPlugin.skillFoodFish, 1,
        ConflictPlugin.skillFoodSeed, 1, player, "Beim Angeln k�nnen mehr Fische gefangen werden (+1)");
    SkillButton b7 = new SkillButton("Pig 1", 72, 20, 10, 0, 5, ConflictPlugin.skillFoodPork, 1,
        ConflictPlugin.skillFoodSeed, 1, player, "Schweine droppen mehr Fleisch (+1)");
    SkillButton b8 = new SkillButton("G3d 4", 72, 20, 10, 0, 5, ConflictPlugin.skillFoodSeed, 2,
        ConflictPlugin.skillFoodHarvest, 1, player, "Man kann mit Saatgut d�ngen (+1 Wachstumsstufe)");

    container.addChildren(layer1Skills, layer1Arrows, layer2Skills, layer2Arrows, layer3Skills);
    container.setX(x).setY(y);
    container.setWidth(400).setHeight(175);
    container.setAuto(false);
    container.setLayout(ContainerType.VERTICAL);

    layer1Arrows.addChildren(t1, t2, t3, t4, t5);
    // layer1Arrows.setX(x).setY(y);
    layer1Arrows.setWidth(400).setHeight(25);
    layer1Arrows.setAuto(false);
    layer1Arrows.setLayout(ContainerType.HORIZONTAL);

    layer1Skills.addChildren(b1.button);
    // layer1Skills.setX(x).setY(y);
    layer1Skills.setWidth(400).setHeight(25);
    layer1Skills.setLayout(ContainerType.HORIZONTAL);
    layer1Skills.setAuto(false);

    layer2Skills.addChildren(b2.button, b4.button, b5.button, b6.button, b7.button);
    // layer2Skills.setX(x).setY(y);
    layer2Skills.setWidth(400).setHeight(25);
    layer2Skills.setLayout(ContainerType.HORIZONTAL);
    layer2Skills.setAuto(false);

    layer2Arrows.addChildren(t6, t7);
    // layer2Arrows.setX(x).setY(y);
    layer2Arrows.setWidth(400).setHeight(25);
    layer2Arrows.setAuto(false);
    layer2Arrows.setLayout(ContainerType.HORIZONTAL);

    layer3Skills.addChildren(b3.button, b8.button);
    // layer3Skills.setX(x).setY(y);
    layer3Skills.setWidth(400).setHeight(25);
    layer3Skills.setLayout(ContainerType.HORIZONTAL);
    layer3Skills.setAuto(false);

    popup.attachWidget(plugin, container);
    player.getMainScreen().attachPopupScreen(popup);

  }
View Full Code Here

TOP

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

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.