Merge branch 'master' into new-netcode
Conflicts: Subsurface/Source/Items/Components/Machines/Deconstructor.cs Subsurface/Source/Items/Components/Machines/Fabricator.cs
This commit is contained in:
@@ -10,6 +10,8 @@ namespace Barotrauma
|
||||
|
||||
protected Alignment textAlignment;
|
||||
|
||||
private float textScale;
|
||||
|
||||
protected Vector2 textPos;
|
||||
protected Vector2 origin;
|
||||
|
||||
@@ -88,6 +90,19 @@ namespace Barotrauma
|
||||
get { return textPos; }
|
||||
}
|
||||
|
||||
public float TextScale
|
||||
{
|
||||
get { return textScale; }
|
||||
set
|
||||
{
|
||||
if (value != textScale)
|
||||
{
|
||||
textScale = value;
|
||||
SetTextPos();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 Origin
|
||||
{
|
||||
get { return origin; }
|
||||
@@ -162,6 +177,8 @@ namespace Barotrauma
|
||||
|
||||
SetTextPos();
|
||||
|
||||
TextScale = 1.0f;
|
||||
|
||||
if (rect.Height == 0 && !string.IsNullOrEmpty(Text))
|
||||
{
|
||||
this.rect.Height = (int)Font.MeasureString(wrappedText).Y;
|
||||
@@ -267,7 +284,7 @@ namespace Barotrauma
|
||||
Wrap ? wrappedText : text,
|
||||
new Vector2(rect.X, rect.Y) + textPos + offset,
|
||||
textColor * (textColor.A / 255.0f),
|
||||
0.0f, origin, 1.0f,
|
||||
0.0f, origin, TextScale,
|
||||
SpriteEffects.None, textDepth);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user