(276dcf6d2) Docking indicator changes color when the docking port is within the sector

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:40:12 +03:00
parent b551ae7999
commit 2199a0f97f
13 changed files with 128 additions and 222 deletions
@@ -132,6 +132,8 @@ namespace Barotrauma
public bool IgnoreLayoutGroups;
public bool IgnoreLayoutGroups;
public virtual ScalableFont Font
{
get;
@@ -515,6 +517,7 @@ namespace Barotrauma
yield return CoroutineStatus.Running;
}
toolTipBlock.SetTextPos();
SetAlpha(to);
@@ -540,11 +543,9 @@ namespace Barotrauma
OutlineColor = style.OutlineColor;
public virtual void Flash(Color? color = null, float flashDuration = 1.5f, bool useRectangleFlash = false, Vector2? flashRectInflate = null)
public virtual void Flash(Color? color = null, float flashDuration = 1.5f)
{
flashTimer = flashDuration;
this.flashRectInflate = flashRectInflate ?? Vector2.Zero;
this.useRectangleFlash = useRectangleFlash;
this.flashDuration = flashDuration;
flashColor = (color == null) ? Color.Red : (Color)color;
}
@@ -47,6 +47,12 @@ namespace Barotrauma
Content = new GUILayoutGroup(new RectTransform(new Vector2(0.9f, 0.85f), InnerFrame.RectTransform, Anchor.Center)) { AbsoluteSpacing = 5 };
Tag = tag;
InnerFrame = new GUIFrame(new RectTransform(new Point(width, height), RectTransform, Anchor.Center) { IsFixedSize = false }, style: null);
GUI.Style.Apply(InnerFrame, "", this);
Content = new GUILayoutGroup(new RectTransform(new Vector2(0.9f, 0.85f), InnerFrame.RectTransform, Anchor.Center)) { AbsoluteSpacing = 5 };
Tag = tag;
if (height == 0)
{
string wrappedText = ToolBox.WrapText(text, Content.Rect.Width, GUI.Font);
@@ -44,10 +44,11 @@ namespace Barotrauma
public Color TextColor
{
get { return box; }
get { return text.TextColor; }
set { text.TextColor = value; }
}
public GUITextBlock TextBlock
public override Rectangle MouseRect
{
get
{