(875de4a5a) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
This commit is contained in:
@@ -69,6 +69,9 @@ namespace Barotrauma
|
||||
public static ScalableFont Font => Style?.Font;
|
||||
public static ScalableFont SmallFont => Style?.SmallFont;
|
||||
public static ScalableFont LargeFont => Style?.LargeFont;
|
||||
public static ScalableFont VideoTitleFont => Style?.VideoTitleFont;
|
||||
public static ScalableFont ObjectiveTitleFont => Style?.ObjectiveTitleFont;
|
||||
public static ScalableFont ObjectiveNameFont => Style?.ObjectiveNameFont;
|
||||
|
||||
public static UISprite UIGlow => Style.UIGlow;
|
||||
|
||||
@@ -530,14 +533,19 @@ namespace Barotrauma
|
||||
if (list.Count == 0) { return; }
|
||||
foreach (var item in list)
|
||||
{
|
||||
int i = updateList.Count - 1;
|
||||
while (updateList[i].UpdateOrder > item.UpdateOrder)
|
||||
int index = 0;
|
||||
if (updateList.Count > 0)
|
||||
{
|
||||
i--;
|
||||
index = updateList.Count - 1;
|
||||
while (updateList[index].UpdateOrder > item.UpdateOrder)
|
||||
{
|
||||
index--;
|
||||
if (index == 0) { break; }
|
||||
}
|
||||
}
|
||||
if (!updateListSet.Contains(item))
|
||||
{
|
||||
updateList.Insert(Math.Max(i, 0), item);
|
||||
updateList.Insert(index, item);
|
||||
updateListSet.Add(item);
|
||||
}
|
||||
}
|
||||
@@ -648,6 +656,7 @@ namespace Barotrauma
|
||||
msg.Timer -= deltaTime;
|
||||
msg.Pos += msg.Velocity * deltaTime;
|
||||
}
|
||||
}
|
||||
|
||||
messages.RemoveAll(m => m.Timer <= 0.0f);
|
||||
}
|
||||
@@ -721,6 +730,10 @@ namespace Barotrauma
|
||||
Vector2 textSize = font.MeasureString(text);
|
||||
DrawRectangle(sb, pos - Vector2.One * backgroundPadding, textSize + Vector2.One * 2.0f * backgroundPadding, (Color)backgroundColor, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Draw(t, new Rectangle(rect.X + thickness, rect.Y, rect.Width - thickness * 2, thickness), null, clr, 0.0f, Vector2.Zero, SpriteEffects.None, depth);
|
||||
sb.Draw(t, new Rectangle(rect.X + thickness, rect.Y + rect.Height - thickness, rect.Width - thickness * 2, thickness), null, clr, 0.0f, Vector2.Zero, SpriteEffects.None, depth);
|
||||
|
||||
font.DrawString(sb, text, pos, color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user