Examples of GenericButton


Examples of org.getspout.spoutapi.gui.GenericButton

            groupname.setTooltip("The name of the group...");
            groupname.setColor(textSecondaryColor);
            groupname.setFieldColor(fieldcolor);
            popup.gridAttachWidget("GroupName",plug, groupname,1,3);

            GenericButton truebutton = new GenericButton("SetTrue");
            truebutton.setTooltip("Set the flag to true.");
            truebutton.setColor(textSecondaryColor);
            truebutton.setHoverColor(hoverColor);
            popup.gridAttachWidget("TrueButton",plug, truebutton,2,1);

            GenericButton falsebutton = new GenericButton("SetFalse");
            falsebutton.setTooltip("Set the flag to false.");
            falsebutton.setColor(textSecondaryColor);
            falsebutton.setHoverColor(hoverColor);
            popup.gridAttachWidget("FalseButton",plug, falsebutton,2,2);

            GenericButton removebutton = new GenericButton("Remove");
            removebutton.setTooltip("Remove the flag.");
            removebutton.setColor(textSecondaryColor);
            removebutton.setHoverColor(hoverColor);
            popup.gridAttachWidget("RemoveButton",plug, removebutton,2,3);
           
            GenericButton removeallbutton = new GenericButton("RemoveAll");
            removeallbutton.setTooltip("Remove all flags from the player or group...");
            removeallbutton.setColor(textSecondaryColor);
            removeallbutton.setHoverColor(hoverColor);
            popup.gridAttachWidget("RemoveAllButton",plug, removeallbutton,3,3);

            screens.put(p, popup);
            p.getMainScreen().attachPopupScreen(popup);
        } else {
View Full Code Here

Examples of org.getspout.spoutapi.gui.GenericButton

    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);
View Full Code Here

Examples of org.getspout.spoutapi.gui.GenericButton

  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

Examples of org.getspout.spoutapi.gui.GenericButton

  public GenericButton button;
 
  public SkillButton(String text, int width, int height, int marginLeft, int marginRight, int level, HashMap<String, Integer> relevantMap,
      int relevantValue, HashMap<String, Integer> prereq, int prereqValue, SpoutPlayer player, String tooltip){
   
     button = new GenericButton(text);
         button.setAnchor(WidgetAnchor.TOP_LEFT);
         button.setWidth(width).setHeight(height);
         button.setMarginLeft(marginLeft).setMarginRight(marginRight).setFixed(true);
         button.setTooltip(tooltip);
         button.setResize(true);
View Full Code Here

Examples of org.spoutcraft.api.gui.GenericButton

  }

  @Override
  protected void createInstances() {
    labels.clear();
    buttonDone = new GenericButton("Done");
    getScreen().attachWidget("Spoutcraft", buttonDone);

    buttonRefresh = new GenericButton();
    getScreen().attachWidget("Spoutcraft", buttonRefresh);

    buttonAddFavorite = new GenericButton("Add Favorite");
    getScreen().attachWidget("Spoutcraft", buttonAddFavorite);

    buttonJoin = new GenericButton("Join");
    getScreen().attachWidget("Spoutcraft", buttonJoin);

    content = new GenericScrollArea();
    content.setScrollBarPolicy(Orientation.HORIZONTAL, ScrollBarPolicy.SHOW_NEVER);

    getScreen().attachWidget("Spoutcraft", content);

    labelTitle = new GenericLabel(item.getTitle());
    getScreen().attachWidget("Spoutcraft", labelTitle);

    buttonOpenBrowser = new GenericButton("More Info...");
    getScreen().attachWidget("Spoutcraft", buttonOpenBrowser);

    labelCategoryLabel = new GenericLabel("Category");
    content.attachWidget("Spoutcraft", labelCategoryLabel);
    labels.add(labelCategoryLabel);
View Full Code Here

Examples of org.spoutcraft.api.gui.GenericButton

  public boolean hasGallery() {
    return gallery.size() != 0;
  }

  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");
View Full Code Here

Examples of org.spoutcraft.api.gui.GenericButton

    textIp.setX(left).setY(top);
    getScreen().attachWidget("Spoutcraft", textIp);
    textIp.setText(item.getIp() + (item.getPort() != ServerItem.DEFAULT_PORT ? ":" + item.getPort() : ""));
    top+=25;

    buttonClear = new GenericButton("Clear");
    buttonClear.setWidth(100).setHeight(20).setX(textIp.getX()).setY(top);
    getScreen().attachWidget("Spoutcraft", buttonClear);

    buttonDone = new GenericButton("Done");
    buttonDone.setWidth(200).setHeight(20).setX(width - 205).setY(height - 25);
    getScreen().attachWidget("Spoutcraft", buttonDone);

    buttonCancel = new GenericButton("Cancel");
    buttonCancel.setWidth(200).setHeight(20).setX(width - 205 - 205).setY(height - 25);
    getScreen().attachWidget("Spoutcraft", buttonCancel);

    updateButtons();
  }
View Full Code Here

Examples of org.spoutcraft.api.gui.GenericButton

    notFull = new FilterButton("Not Full", "notfull", model);
    accessType = new AccessTypeFilter(model);
    search = new SearchField(model);
    buttonCountry = new CountryButton();
    view = new GenericListView(model);
    buttonJoin = new GenericButton("Join Server");
    buttonMainMenu = new GenericButton("Main Menu");
    buttonFavorites = new GenericButton("Favorites");
    buttonRefresh = new GenericButton("Refresh");
    buttonReset = new GenericButton("Reset Filters");
    buttonAddServer = new GenericButton("Add Your Server");
    buttonInfo = new GenericButton("More Info...");

    if (!model.getCurrentUrl().equals(model.getDefaultUrl())) {
      model.clear();
      model.refreshAPIData(model.getDefaultUrl(), 0, true);
    }
View Full Code Here

Examples of org.spoutcraft.api.gui.GenericButton

    labelTitle = new GenericLabel("Public Servers");
    labelTitle.setY(12).setX(width / 2 - mc.fontRenderer.getStringWidth(labelTitle.getText()) / 2);
    labelTitle.setHeight(15).setWidth(mc.fontRenderer.getStringWidth(labelTitle.getText()) / 2);
    getScreen().attachWidget("Spoutcraft", labelTitle);

    buttonMoveUp = new GenericButton("/\\");
    buttonMoveUp.setTooltip("Move Item Up");
    buttonMoveUp.setX(5).setY(5);
    buttonMoveUp.setHeight(20).setWidth(20);
    getScreen().attachWidget("Spoutcraft", buttonMoveUp);

    buttonMoveDown = new GenericButton("\\/");
    buttonMoveDown.setTooltip("Move Item Down");
    buttonMoveDown.setX(25).setY(5);
    buttonMoveDown.setHeight(20).setWidth(20);
    getScreen().attachWidget("Spoutcraft", buttonMoveDown);

    buttonRefresh = new GenericButton("Refresh");
    buttonRefresh.setHeight(20).setWidth(100).setX(width - 105).setY(5);
    getScreen().attachWidget("Spoutcraft", buttonRefresh);

    int viewheight = height - 110;
    view = new GenericListView(model);
    view.setX(5).setY(30).setWidth(width - 10).setHeight(viewheight);
    getScreen().attachWidget("Spoutcraft", view);

    int top = (int) (view.getY() + view.getHeight() + 5);

    int totalWidth = Math.min(width - 9, 200 * 3 + 10);
    int cellWidth = (totalWidth - 10) / 3;
    int left = width / 2 - totalWidth / 2;
    int center = left + cellWidth + 5;
    int right = center + cellWidth + 5;

    String text = SpoutClient.getHandle().gameSettings.lastServer.replace("_", ":");
    if (textQuickJoin != null) {
      text = textQuickJoin.getText();
    }
    textQuickJoin = new QuickJoin();
    textQuickJoin.setX(left + 2).setY(top + 2).setHeight(16).setWidth((cellWidth * 2 + 5 - 4) - (cellWidth/2));
    textQuickJoin.setMaximumCharacters(0);
    textQuickJoin.setText(text);
    getScreen().attachWidget("Spoutcraft", textQuickJoin);

    buttonClear = new GenericButton("Clear");
    buttonClear.setX(left + 10 + (cellWidth*2) - (cellWidth/2)).setY(top).setWidth((cellWidth/2) - 5).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonClear);
   
    buttonQuickJoin = new GenericButton("Quick Join");
    buttonQuickJoin.setX(right).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonQuickJoin);

    top += 25;

    buttonJoin = new GenericButton("Join Server");
    buttonJoin.setX(right).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonJoin);

    buttonAddtoFavorites = new GenericButton("Add this to Favorites");
    buttonAddtoFavorites.setX(center).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonAddtoFavorites);

    top += 25;
    buttonAddServer = new GenericButton("Add Your Server");
    buttonAddServer.setX(left).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonAddServer);
   
    buttonFavoritesList = new GenericButton("Favorites");
    buttonFavoritesList.setX(center).setY(top).setWidth(cellWidth)
        .setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonFavoritesList);

    buttonMainMenu = new GenericButton("Main Menu");
    buttonMainMenu.setX(right).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonMainMenu);
    refresh();
    updateButtons();
  }
View Full Code Here

Examples of org.spoutcraft.api.gui.GenericButton

    labelTitle = new GenericLabel("Favorite Servers");
    labelTitle.setY(12).setX(width / 2 - mc.fontRenderer.getStringWidth(labelTitle.getText()) / 2);
    labelTitle.setHeight(15).setWidth(mc.fontRenderer.getStringWidth(labelTitle.getText()) / 2);
    getScreen().attachWidget("Spoutcraft", labelTitle);

    buttonMoveUp = new GenericButton("/\\");
    buttonMoveUp.setTooltip("Move Item Up");
    buttonMoveUp.setX(5).setY(5);
    buttonMoveUp.setHeight(20).setWidth(20);
    getScreen().attachWidget("Spoutcraft", buttonMoveUp);

    buttonMoveDown = new GenericButton("\\/");
    buttonMoveDown.setTooltip("Move Item Down");
    buttonMoveDown.setX(25).setY(5);
    buttonMoveDown.setHeight(20).setWidth(20);
    getScreen().attachWidget("Spoutcraft", buttonMoveDown);

    buttonRefresh = new GenericButton("Refresh");
    buttonRefresh.setHeight(20).setWidth(100).setX(width - 105).setY(5);
    getScreen().attachWidget("Spoutcraft", buttonRefresh);

    int viewheight = height - 110;
    view = new GenericListView(model);
    view.setX(5).setY(30).setWidth(width - 10).setHeight(viewheight);
    getScreen().attachWidget("Spoutcraft", view);

    int top = (int) (view.getY() + view.getHeight() + 5);

    int totalWidth = Math.min(width - 9, 200 * 3 + 10);
    int cellWidth = (totalWidth - 10) / 3;
    int left = width / 2 - totalWidth / 2;
    int center = left + cellWidth + 5;
    int right = center + cellWidth + 5;

    String text = SpoutClient.getHandle().gameSettings.lastServer.replace("_", ":");
    if (textQuickJoin != null) {
      text = textQuickJoin.getText();
    }
    textQuickJoin = new QuickJoin();
    textQuickJoin.setX(left + 2).setY(top + 2).setHeight(16).setWidth((cellWidth * 2 + 5 - 4) - (cellWidth/2));
    textQuickJoin.setMaximumCharacters(0);
    textQuickJoin.setText(text);
    getScreen().attachWidget("Spoutcraft", textQuickJoin);

    buttonClear = new GenericButton("Clear");
    buttonClear.setX(left + 10 + (cellWidth*2) - (cellWidth/2)).setY(top).setWidth((cellWidth/2) - 5).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonClear);

    buttonQuickJoin = new GenericButton("Quick Join");
    buttonQuickJoin.setX(right).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonQuickJoin);

    top += 25;

    buttonJoin = new GenericButton("Join Server");
    buttonJoin.setX(right).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonJoin);

    buttonAdd = new GenericButton("Add Favorite");
    buttonAdd.setX(center).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonAdd);

    buttonEdit = new GenericButton("Edit");
    buttonEdit.setX(left).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonEdit);

    top += 25;

    buttonDelete = new DeleteFavoriteButton(this);
    buttonDelete.setX(left).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonDelete);

    buttonServerList = new GenericButton("Public Servers");
    buttonServerList.setX(center).setY(top).setWidth(cellWidth)
        .setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonServerList);

    buttonMainMenu = new GenericButton("Main Menu");
    buttonMainMenu.setX(right).setY(top).setWidth(cellWidth).setHeight(20);
    getScreen().attachWidget("Spoutcraft", buttonMainMenu);
    refresh();
    updateButtons();
    SpoutClient.getInstance().getServerManager().staticServers.load();
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.