Package games.stendhal.client.gui

Examples of games.stendhal.client.gui.UserInterface


   * @return <code>true</code> if was handled.
   */
  public boolean execute(final String[] params, final String remainder) {
    if (params[0] == null) {
      float volume = ClientSingletonRepository.getSound().getVolume();
      UserInterface ui = ClientSingletonRepository.getUserInterface();
      ui.addEventLine(new StandardEventLine("Please use /volume <name> <value> to adjust the volume."));
      ui.addEventLine(new HeaderLessEventLine("<name> is an item from the following list. \"master\" refers to the global volume setting.", NotificationType.CLIENT));
      ui.addEventLine(new HeaderLessEventLine("<value> is in the range from 0 to 100 but may be set higher.", NotificationType.CLIENT));
      ui.addEventLine(new HeaderLessEventLine("master -> " + Numeric.floatToInt(volume, 100.0f), NotificationType.CLIENT));

      for (String name : ClientSingletonRepository.getSound().getGroupNames()) {
        volume = ClientSingletonRepository.getSound().getGroup(name).getVolume();
        ui.addEventLine(new HeaderLessEventLine(name + " -> " + Numeric.floatToInt(volume, 100.0f), NotificationType.CLIENT));
      }
    } else if (params[1] != null) {
      changeVolume(params[0], params[1]);
    } else {
      ClientSingletonRepository.getUserInterface().addEventLine(
View Full Code Here

TOP

Related Classes of games.stendhal.client.gui.UserInterface

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.