(6e6175b77) Credits stuff (libraries, placeholder publishing & contributor sections, layout improvements)
This commit is contained in:
@@ -46,6 +46,9 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
var text = element.ElementInnerText().Replace(@"\n", "\n");
|
var text = element.ElementInnerText().Replace(@"\n", "\n");
|
||||||
Color color = element.GetAttributeColor("color", Color.White);
|
Color color = element.GetAttributeColor("color", Color.White);
|
||||||
|
float scale = element.GetAttributeFloat("scale", 1.0f);
|
||||||
|
Alignment alignment = Alignment.Center;
|
||||||
|
Enum.TryParse(element.GetAttributeString("alignment", "Center"), out alignment);
|
||||||
ScalableFont font = GUI.Font;
|
ScalableFont font = GUI.Font;
|
||||||
switch (element.GetAttributeString("font", "Font").ToLowerInvariant())
|
switch (element.GetAttributeString("font", "Font").ToLowerInvariant())
|
||||||
{
|
{
|
||||||
@@ -74,8 +77,11 @@ namespace Barotrauma
|
|||||||
text,
|
text,
|
||||||
color,
|
color,
|
||||||
font,
|
font,
|
||||||
Alignment.Center,
|
alignment,
|
||||||
wrap: true);
|
wrap: true)
|
||||||
|
{
|
||||||
|
TextScale = scale
|
||||||
|
};
|
||||||
textBlock.RectTransform.IsFixedSize = textHolder.RectTransform.IsFixedSize = true;
|
textBlock.RectTransform.IsFixedSize = textHolder.RectTransform.IsFixedSize = true;
|
||||||
textBlock.RectTransform.NonScaledSize = new Point(textBlock.Rect.Width, textBlock.Rect.Height);
|
textBlock.RectTransform.NonScaledSize = new Point(textBlock.Rect.Width, textBlock.Rect.Height);
|
||||||
textHolder.RectTransform.NonScaledSize = new Point(textHolder.Rect.Width, textBlock.Rect.Height);
|
textHolder.RectTransform.NonScaledSize = new Point(textHolder.Rect.Width, textBlock.Rect.Height);
|
||||||
|
|||||||
Reference in New Issue
Block a user