v0.3.2.6: launcher text wrapping fix

This commit is contained in:
Regalis
2016-02-18 22:47:46 +02:00
parent 9e11134bd3
commit b49641ecb8
4 changed files with 11 additions and 10 deletions
+6 -6
View File
@@ -286,20 +286,20 @@ namespace Launcher2
{
updateInfoBox.ClearChildren();
string wrappedText = ToolBox.WrapText(text, updateInfoBox.Rect.Width, GUI.SmallFont);
//string wrappedText = ToolBox.WrapText(text, updateInfoBox.Rect.Width, GUI.SmallFont);
int lineHeight = (int)GUI.SmallFont.MeasureString(" ").Y;
//int lineHeight = (int)GUI.SmallFont.MeasureString(" ").Y;
string[] lines = wrappedText.Split('\n');
string[] lines = text.Split('\n');
foreach (string line in lines)
{
if (string.IsNullOrWhiteSpace(line)) continue;
GUITextBlock textBlock = new GUITextBlock(
new Rectangle(0,0,0,lineHeight),
new Rectangle(0,0,0,0),
line, GUI.Style,
Alignment.TopLeft, Alignment.TopLeft,
updateInfoBox, false, GUI.SmallFont);
updateInfoBox, true, GUI.SmallFont);
textBlock.CanBeFocused = false;
}
@@ -441,7 +441,7 @@ namespace Launcher2
innerText = innerText.Replace("\r\n", "\n");
sb.Append(innerText+"\n");
sb.AppendLine("*************************************\n");
sb.AppendLine("----------------------------\n");
}
SetUpdateInfoBox(sb.ToString());