Infinite wall fixes, pressure damage to sub, sub/mode voting & randomization working now, better ui scaling

This commit is contained in:
Regalis
2015-10-31 00:29:51 +02:00
parent dc4b502248
commit bcc96cee97
33 changed files with 1068 additions and 151 deletions

View File

@@ -370,12 +370,12 @@ namespace Barotrauma
public GUIComponent FindChild(object userData)
{
foreach (GUIComponent child in children)
{
if (child.userData == userData) return child;
}
return children.FirstOrDefault(c => c.userData == userData);
}
return null;
public List<GUIComponent> FindChildren(object userData)
{
return children .FindAll(c => c.userData == userData);
}
public virtual void ClearChildren()

View File

@@ -76,7 +76,13 @@ namespace Barotrauma
{
get { return caretPos; }
}
public GUITextBlock(Rectangle rect, string text, GUIStyle style, GUIComponent parent, SpriteFont font)
: this(rect, text, style, Alignment.TopLeft, Alignment.TopLeft, parent, false, font)
{
}
public GUITextBlock(Rectangle rect, string text, GUIStyle style, GUIComponent parent = null, bool wrap = false)
: this(rect, text, style, Alignment.TopLeft, Alignment.TopLeft, parent, wrap)
{