Package org.spoutcraft.api.gui

Examples of org.spoutcraft.api.gui.GenericTextField


    this.parent = parent;
  }

  protected void createInstances() {
    labelTitle = new GenericLabel(title);
    textText = new GenericTextField();
    textText.setWidth(200);
    textText.setText(text);

    buttonCancel = new GenericButton("Cancel");
    buttonDone = new GenericButton("Done");
View Full Code Here


    size = Spoutcraft.getMinecraftFont().getTextWidth(label.getText());
    label.setX(left).setY(70);
    label.setFixed(true).setPriority(RenderPriority.Lowest);
    getScreen().attachWidget("Spoutcraft", label);

    name = new GenericTextField();
    name.setHeight(20).setWidth(300).setX(left).setY(81);
    name.setMaximumCharacters(0);
    name.setFixed(true).setPriority(RenderPriority.Lowest);
    name.setText(toEdit.name);
    getScreen().attachWidget("Spoutcraft", name);
View Full Code Here

    titleLabel = new GenericLabel("Name:");
    titleLabel.setGeometry(left, top + 3, labelWidth, labelHeight);
    getScreen().attachWidget("Spoutcraft", titleLabel);

    commandName = new GenericTextField();
    commandName.setGeometry(right, top - 1, (int) (width - right - recordButton.getWidth() - 20), 16);
    commandName.setText(item.getTitle());
    commandName.setMaximumCharacters(0);
    commandName.setPlaceholder("Enter a name here");
    getScreen().attachWidget("Spoutcraft", commandName);

    top += 23;

    commandLabel = new GenericLabel("Command:");
    commandLabel.setGeometry(left, top + 3, labelWidth, labelHeight);
    getScreen().attachWidget("Spoutcraft", commandLabel);

    commandText = new GenericTextField();
    commandText.setGeometry(right, top - 1, width - right - 10, 16);
    commandText.setMaximumCharacters(0);
    commandText.setPlaceholder("Enter new command here, then click \"Add Command\"");
    getScreen().attachWidget("Spoutcraft", commandText);

    top += 23;

    delayLabel = new GenericLabel("Delay (ms)");
    delayLabel.setGeometry(left, top + 3, labelWidth, labelHeight);
    getScreen().attachWidget("Spoutcraft", delayLabel);

    delayText = new GenericTextField();
    delayText.setGeometry(right, top - 1, width - right - 10, 16);
    delayText.setText(item.getDelay() + "");
    delayText.setTextProcessor(new GenericTextProcessor() {
      protected boolean insert(char c) {
        if (c >= '0' && c <= '9') {
View Full Code Here

TOP

Related Classes of org.spoutcraft.api.gui.GenericTextField

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.