TextBoxes align text to the right and hide any overflowing text at the left if the width of the box is exceeded

This commit is contained in:
Regalis
2017-04-30 18:14:25 +03:00
parent eddc33dc89
commit f92c2df9f7
7 changed files with 56 additions and 54 deletions

View File

@@ -1,10 +1,6 @@
using Barotrauma.Items.Components;
using Barotrauma.Networking.ReliableMessages;
using Lidgren.Network;
using Lidgren.Network;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Barotrauma.Networking
@@ -18,8 +14,15 @@ namespace Barotrauma.Networking
class ChatMessage
{
public const float SpeakRange = 2000.0f;
public static Color[] MessageColor = { Color.White, Color.Red, new Color(63, 72, 204), Color.LightGreen, Color.Yellow };
public static Color[] MessageColor =
{
new Color(125, 140, 153),
new Color(204, 74, 78),
new Color(63, 72, 204),
new Color(157, 225, 160),
new Color(228, 199, 27)
};
public readonly string Text;