public abstract class ChatLogic extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ATTENTION
Our internal code for attention system messages.
|
static int |
BROADCAST
Type place code for broadcast chat type.
|
static int |
CONTINUATION
Our internal code for any type of chat that is continued in a subtitle.
|
static int |
DEFAULT_CHAT_DECAY
The default chat decay parameter.
|
static int |
EMOTE
Type mode code for emote chat type.
|
static int |
FEEDBACK
Our internal code for feedback system messages.
|
static int |
IGNORECHAT
Our internal code for a chat type we will ignore.
|
static int |
INFO
Our internal code for info system messges.
|
static int |
PAD
The padding in each direction around the text to the edges of a chat 'bubble'.
|
static int |
PLACE
Type place code for default place chat (cluster, scene).
|
static int |
SHOUT
Type mode code for shout chat type.
|
static int |
SPEAK
Type mode code for default chat type (speaking).
|
static int |
SPECIALIZED
Type code for a chat type that was used in some special context, like in a negotiation.
|
static int |
TELL
Our internal code for tell chat.
|
static int |
TELLFEEDBACK
Our internal code for tell feedback chat.
|
static int |
THINK
Type mode code for think chat type.
|
| Constructor and Description |
|---|
ChatLogic() |
| Modifier and Type | Method and Description |
|---|---|
int |
adjustTypeByMode(int mode,
int type)
Adjust the chat type based on the mode of the chat message.
|
Label |
createLabel(String text)
Creates a label for the specified text.
|
Tuple<String,Boolean> |
decodeFormat(int type,
String format)
Determines the format string and whether to use quotes based on the chat type.
|
int |
decodeType(String localtype)
Decodes the main chat type given the supplied localtype provided by the chat system.
|
abstract String |
getDefaultMessageBundle()
Returns the message bundle used to translate default messages.
|
long[] |
getDisplayDurations(int indexOffset)
Returns metrics on how long chat messages should be displayed.
|
Font |
getFont(int type)
Get the font to use for the given bubble type.
|
Color |
getOutlineColor(int type)
Computes the chat glyph outline color from the chat message type.
|
Shape |
getPlaceSubtitleShape(int type,
Rectangle r)
A helper function for
getSubtitleShape(int, java.awt.Rectangle, java.awt.Rectangle). |
Shape |
getSubtitleShape(int type,
Rectangle r,
Rectangle b)
Get the appropriate shape for the specified type of chat.
|
int |
getSubtitleSpacing(int type)
Get the spacing, in pixels, between the latest subtitle of the specified type and the
previous subtitle.
|
public static final int DEFAULT_CHAT_DECAY
getDisplayDurationIndex().public static final int PAD
public static final int SPEAK
public static final int SHOUT
public static final int EMOTE
public static final int THINK
public static final int PLACE
public static final int SPECIALIZED
public static final int TELL
public static final int TELLFEEDBACK
public static final int INFO
public static final int FEEDBACK
public static final int ATTENTION
public static final int CONTINUATION
public static final int BROADCAST
public static final int IGNORECHAT
public abstract String getDefaultMessageBundle()
public Tuple<String,Boolean> decodeFormat(int type, String format)
public int decodeType(String localtype)
public int adjustTypeByMode(int mode,
int type)
public Font getFont(int type)
public Label createLabel(String text)
public Color getOutlineColor(int type)
public Shape getSubtitleShape(int type, Rectangle r, Rectangle b)
r - the rectangle bounding the chat label.b - the rectangle bounding the chat label and icon.public int getSubtitleSpacing(int type)
public Shape getPlaceSubtitleShape(int type, Rectangle r)
getSubtitleShape(int, java.awt.Rectangle, java.awt.Rectangle).public long[] getDisplayDurations(int indexOffset)
Copyright © 2015. All rights reserved.