(048b753e6) Merge branch 'dev' into human-ai
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -247,7 +249,7 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
textPos = new Vector2(rect.Width / 2.0f, rect.Height / 2.0f);
|
||||
textPos = new Vector2(padding.X + (rect.Width - padding.Z - padding.X) / 2.0f, padding.Y + (rect.Height - padding.Y - padding.W) / 2.0f);
|
||||
origin = TextSize * 0.5f;
|
||||
|
||||
if (textAlignment.HasFlag(Alignment.Left) && !overflowClipActive)
|
||||
|
||||
@@ -57,14 +57,17 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToolTip
|
||||
public override ScalableFont Font
|
||||
{
|
||||
get { return base.ToolTip; }
|
||||
get
|
||||
{
|
||||
return base.Font;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
base.ToolTip = value;
|
||||
box.ToolTip = value;
|
||||
text.ToolTip = value;
|
||||
base.Font = value;
|
||||
if (text != null) text.Font = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +76,11 @@ namespace Barotrauma
|
||||
get { return box; }
|
||||
}
|
||||
|
||||
public GUITextBlock TextBlock
|
||||
{
|
||||
get { return text; }
|
||||
}
|
||||
|
||||
public override string ToolTip
|
||||
{
|
||||
get { return base.ToolTip; }
|
||||
@@ -120,6 +128,7 @@ namespace Barotrauma
|
||||
private void ResizeBox()
|
||||
{
|
||||
box.RectTransform.NonScaledSize = new Point(RectTransform.NonScaledSize.Y);
|
||||
text.RectTransform.NonScaledSize = new Point(Rect.Width - box.Rect.Width, text.Rect.Height);
|
||||
text.RectTransform.AbsoluteOffset = new Point(box.Rect.Width, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user