project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/MessageLog.java
equal
deleted
inserted
replaced
25 |
25 |
26 public class MessageLog { |
26 public class MessageLog { |
27 private static final int BACKLOG_LINES = 200; |
27 private static final int BACKLOG_LINES = 200; |
28 |
28 |
29 private static final int INFO_COLOR = Color.GRAY; |
29 private static final int INFO_COLOR = Color.GRAY; |
|
30 private static final int PLAYERINFO_COLOR = Color.GREEN; |
30 private static final int CHAT_COLOR = Color.GREEN; |
31 private static final int CHAT_COLOR = Color.GREEN; |
31 private static final int MECHAT_COLOR = Color.CYAN; |
32 private static final int MECHAT_COLOR = Color.CYAN; |
32 private static final int WARN_COLOR = Color.RED; |
33 private static final int WARN_COLOR = Color.RED; |
33 private static final int ERROR_COLOR = Color.RED; |
34 private static final int ERROR_COLOR = Color.RED; |
34 |
35 |
109 break; |
110 break; |
110 case JnaFrontlib.NETCONN_MSG_TYPE_WARNING: |
111 case JnaFrontlib.NETCONN_MSG_TYPE_WARNING: |
111 append(withColor("***"+msg, WARN_COLOR)); |
112 append(withColor("***"+msg, WARN_COLOR)); |
112 break; |
113 break; |
113 case JnaFrontlib.NETCONN_MSG_TYPE_PLAYERINFO: |
114 case JnaFrontlib.NETCONN_MSG_TYPE_PLAYERINFO: |
114 // TODO better formatting or different way to display |
115 // TODO Display in popup? |
115 append(msg); |
116 append(withColor(msg.replace("\n", " "), PLAYERINFO_COLOR)); |
116 break; |
117 break; |
117 case JnaFrontlib.NETCONN_MSG_TYPE_SERVERMESSAGE: |
118 case JnaFrontlib.NETCONN_MSG_TYPE_SERVERMESSAGE: |
118 appendRaw(span(TextUtils.concat("\n", Html.fromHtml(msg), "\n"), new RelativeSizeSpan(1.5f))); |
119 appendRaw(span(TextUtils.concat("\n", Html.fromHtml(msg), "\n"), new RelativeSizeSpan(1.5f))); |
119 break; |
120 break; |
120 default: |
121 default: |