LazyLib

org.lazywizard.lazylib.campaign
Class MessageUtils

java.lang.Object
  extended by org.lazywizard.lazylib.campaign.MessageUtils

public class MessageUtils
extends java.lang.Object

Allows formatted, multi-line, word-wrapped sector messages

Since:
1.0
Author:
LazyWizard

Field Summary
static int LINE_LENGTH
          How long a line can be before being split by showMessage(java.lang.String)
 
Method Summary
static void showMessage(java.lang.String message)
          Formats and word-wraps the supplied text, then outputs it to the player.
static void showMessage(java.lang.String preamble, java.lang.String message, boolean indent)
          Formats and word-wraps the supplied text, then outputs it to the player.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_LENGTH

public static final int LINE_LENGTH
How long a line can be before being split by showMessage(java.lang.String)

See Also:
Constant Field Values
Method Detail

showMessage

public static void showMessage(java.lang.String preamble,
                               java.lang.String message,
                               boolean indent)
Formats and word-wraps the supplied text, then outputs it to the player.

Parameters:
preamble - The header for this message, won't be indented.
message - The main body of text.
indent - Whether to indent each line of the main body.
Since:
1.0

showMessage

public static void showMessage(java.lang.String message)
Formats and word-wraps the supplied text, then outputs it to the player.

Parameters:
message - The message to output.
Since:
1.0

LazyLib