Package com.svanloon.game.wizard.human.dialog

Examples of com.svanloon.game.wizard.human.dialog.PromptDialog.prompt()


    Point location = new Point(0,0);
    Dimension size = new Dimension(900,720);
    Dimension dialogSize = dialog.getSize();
    dialog.setLocation((int)(location.getX() + size.getWidth() / 2.0 - dialogSize.getWidth() / 2.0), (int)(location.getY() + size.getHeight()/2.0 - dialogSize.getHeight()/2.0));

    dialog.prompt();
    String ip = dialog.getValue();
    up.setIp(ip);
    new UserPreferencesManager().persist(up);
    return ip;
  }
View Full Code Here


    PromptDialog dialog = new PromptDialog(LanguageFactory.getInstance().getString(MessageId.name), LanguageFactory.getInstance().getString(MessageId.whatsYourName), up.getName(), false, 0, 255, -1);
    Point location = new Point(0,0);
    Dimension size = new Dimension(900,720);
    Dimension dialogSize = dialog.getSize();
    dialog.setLocation((int)(location.getX() + size.getWidth() / 2.0 - dialogSize.getWidth() / 2.0), (int)(location.getY() + size.getHeight()/2.0 - dialogSize.getHeight()/2.0));
    dialog.prompt();
    String name = dialog.getValue();
    up.setName(name);
    new UserPreferencesManager().persist(up);
    return name;
  }
View Full Code Here

    PromptDialog dialog = new PromptDialog(LanguageFactory.getInstance().getString(MessageId.xsBid, "playerName", getName()), LanguageFactory.getInstance().getString(MessageId.whatDoYouWantToBid) + suffix, "", true, 0, round, notAllowedToBid);
    Point location = jFrame.getLocation();
    Dimension size = jFrame.getSize();
    Dimension dialogSize = dialog.getSize();
    dialog.setLocation((int)(location.getX() + size.getWidth() / 2.0 - dialogSize.getWidth() / 2.0), (int)(location.getY() + size.getHeight()/2.0 - dialogSize.getHeight()/2.0));
    dialog.prompt();
    int bid = dialog.getIntValue();
    return bid;
  }

}
View Full Code Here

      PromptDialog dialog = new PromptDialog(LanguageFactory.getInstance().getString(MessageId.players), LanguageFactory.getInstance().getString(MessageId.howManyHumanPlayersDoYouWant), "", true, -1, 4, -2);
      Point location = new Point(0,0);
      Dimension size = new Dimension(900,720);
      Dimension dialogSize = dialog.getSize();
      dialog.setLocation((int)(location.getX() + size.getWidth() / 2.0 - dialogSize.getWidth() / 2.0), (int)(location.getY() + size.getHeight()/2.0 - dialogSize.getHeight()/2.0));
      dialog.prompt();
      return dialog.getIntValue();
    }

    return numberOfPlayers.intValue();
  }
View Full Code Here

    PromptDialog dialog = new PromptDialog(LanguageFactory.getInstance().getString(MessageId.name), LanguageFactory.getInstance().getString(MessageId.whatsYourName), up.getName(), false, 0, 255, -1);
    Point location = new Point(0,0);
    Dimension size = new Dimension(900,720);
    Dimension dialogSize = dialog.getSize();
    dialog.setLocation((int)(location.getX() + size.getWidth() / 2.0 - dialogSize.getWidth() / 2.0), (int)(location.getY() + size.getHeight()/2.0 - dialogSize.getHeight()/2.0));
    dialog.prompt();
    String name = dialog.getValue();
    up.setName(name);
    new UserPreferencesManager().persist(up);
    return name;
  }
View Full Code Here

    Point location = new Point(0,0);
    Dimension size = new Dimension(900,720);
    Dimension dialogSize = dialog.getSize();
    dialog.setLocation((int)(location.getX() + size.getWidth() / 2.0 - dialogSize.getWidth() / 2.0), (int)(location.getY() + size.getHeight()/2.0 - dialogSize.getHeight()/2.0));

    dialog.prompt();
    String ip = dialog.getValue();
    up.setIp(ip);
    new UserPreferencesManager().persist(up);
    return ip;
  }
View Full Code Here

    PromptDialog dialog = new PromptDialog(LanguageFactory.getInstance().getString(MessageId.name), LanguageFactory.getInstance().getString(MessageId.whatsYourName), up.getName(), false, 0, 255, -1);
    Point location = new Point(0,0);
    Dimension size = new Dimension(900,720);
    Dimension dialogSize = dialog.getSize();
    dialog.setLocation((int)(location.getX() + size.getWidth() / 2.0 - dialogSize.getWidth() / 2.0), (int)(location.getY() + size.getHeight()/2.0 - dialogSize.getHeight()/2.0));
    dialog.prompt();
    String name = dialog.getValue();
    up.setName(name);
    new UserPreferencesManager().persist(up);
    return name;
  }
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.