Package org.lazywizard.lazylib.campaign
Class MessageUtils
Object
MessageUtils
Allows formatted, multi-line, word-wrapped sector messages
- Since:
- 1.0
- Author:
- LazyWizard
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHow long a line can be before being split byshowMessage(java.lang.String). -
Method Summary
Modifier and TypeMethodDescriptionstatic voidshowMessage(String message) Formats and word-wraps the supplied text, then outputs it as a sector message.static voidshowMessage(String preamble, String message, boolean indentMessage) Formats and word-wraps the supplied text, then outputs it as a sector message.
-
Field Details
-
LINE_LENGTH
public static final int LINE_LENGTHHow long a line can be before being split byshowMessage(java.lang.String). This is hardcoded to a number that still looks good at very low resolutions. If you wish to have a different message length, you can useStringUtils.wrapString(java.lang.String, int)then output the results.- See Also:
-
-
Method Details
-
showMessage
Formats and word-wraps the supplied text, then outputs it as a sector message.- Parameters:
preamble- The header for this message, won't be indented. Can be null.message- The main body of text.indentMessage- Whether to indent each line of the main body.- Since:
- 1.0
-
showMessage
Formats and word-wraps the supplied text, then outputs it as a sector message.- Parameters:
message- The message to output.- Since:
- 1.0
-