Adds a [PM] tag
Fixes .Private message type colors being silly
This commit is contained in:
@@ -69,7 +69,10 @@ namespace Barotrauma.Networking
|
|||||||
textBox.TextColor = ChatMessage.MessageColor[(int)ChatMessageType.Dead];
|
textBox.TextColor = ChatMessage.MessageColor[(int)ChatMessageType.Dead];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
textBox.TextColor = ChatMessage.MessageColor[(int)ChatMessageType.Default];
|
if (command != "") //PMing
|
||||||
|
textBox.TextColor = ChatMessage.MessageColor[(int)ChatMessageType.Private];
|
||||||
|
else
|
||||||
|
textBox.TextColor = ChatMessage.MessageColor[(int)ChatMessageType.Default];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1099,7 +1099,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
GUITextBlock msg = new GUITextBlock(new Rectangle(0, 0, chatBox.Rect.Width - 20, 0),
|
GUITextBlock msg = new GUITextBlock(new Rectangle(0, 0, chatBox.Rect.Width - 20, 0),
|
||||||
message.TextWithSender,
|
(message.Type == ChatMessageType.Private ? "[PM] " : "") + message.TextWithSender,
|
||||||
((chatBox.CountChildren % 2) == 0) ? Color.Transparent : Color.Black * 0.1f, message.Color,
|
((chatBox.CountChildren % 2) == 0) ? Color.Transparent : Color.Black * 0.1f, message.Color,
|
||||||
Alignment.Left, Alignment.TopLeft, "", null, true, GUI.SmallFont);
|
Alignment.Left, Alignment.TopLeft, "", null, true, GUI.SmallFont);
|
||||||
msg.UserData = message;
|
msg.UserData = message;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace Barotrauma.Networking
|
|||||||
new Color(63, 72, 204), //dead
|
new Color(63, 72, 204), //dead
|
||||||
new Color(157, 225, 160), //server
|
new Color(157, 225, 160), //server
|
||||||
new Color(238, 208, 0), //radio
|
new Color(238, 208, 0), //radio
|
||||||
new Color(228, 199, 27) //private
|
new Color(64, 240, 89) //private
|
||||||
};
|
};
|
||||||
|
|
||||||
public readonly string Text;
|
public readonly string Text;
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(message.SenderName))
|
if (!string.IsNullOrWhiteSpace(message.SenderName))
|
||||||
{
|
{
|
||||||
displayedText = message.SenderName + ": " + displayedText;
|
displayedText = (message.Type == ChatMessageType.Private ? "[PM] " : "" ) + message.SenderName + ": " + displayedText;
|
||||||
}
|
}
|
||||||
|
|
||||||
GUITextBlock msg = new GUITextBlock(new Rectangle(0, 0, chatBox.Rect.Width - 40, 0), displayedText,
|
GUITextBlock msg = new GUITextBlock(new Rectangle(0, 0, chatBox.Rect.Width - 40, 0), displayedText,
|
||||||
|
|||||||
Reference in New Issue
Block a user