Functional networkevent validation, functional single player saving, requireditem ui texts, titlescreen & loading

This commit is contained in:
Regalis
2015-07-19 02:44:42 +03:00
parent 237df18765
commit baa207985c
78 changed files with 1237 additions and 596 deletions
+12 -3
View File
@@ -30,6 +30,16 @@ namespace Subsurface
set;
}
public override SpriteFont Font
{
set
{
base.Font = value;
if (textBlock == null) return;
textBlock.Font = value;
}
}
public override Color Color
{
get { return color; }
@@ -59,13 +69,12 @@ namespace Subsurface
String filtered = "";
foreach (char c in value)
{
if (GUI.font.Characters.Contains(c))
filtered += c;
if (Font.Characters.Contains(c)) filtered += c;
}
textBlock.Text = filtered;
if (GUI.font.MeasureString(textBlock.Text).X > rect.Width)
if (Font.MeasureString(textBlock.Text).X > rect.Width)
{
//recursion to ensure that text cannot be larger than the box
Text = textBlock.Text.Substring(0, textBlock.Text.Length - 1);