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
+21 -7
View File
@@ -23,6 +23,8 @@ namespace Subsurface
protected Rectangle rect;
public bool CanBeFocused;
protected Vector4 padding;
protected Color color;
@@ -34,6 +36,12 @@ namespace Subsurface
protected ComponentState state;
public virtual SpriteFont Font
{
get;
set;
}
//protected float alpha;
public GUIComponent Parent
@@ -139,10 +147,12 @@ namespace Subsurface
OutlineColor = Color.Transparent;
Font = GUI.Font;
sprites = new List<Sprite>();
children = new List<GUIComponent>();
CanBeFocused = true;
if (style!=null) style.Apply(this);
}
@@ -196,13 +206,17 @@ namespace Subsurface
public virtual void Update(float deltaTime)
{
if (rect.Contains(PlayerInput.MousePosition))
if (CanBeFocused)
{
MouseOn = this;
}
else
{
if (MouseOn == this) MouseOn = null;
if (rect.Contains(PlayerInput.MousePosition))
{
MouseOn = this;
}
else
{
if (MouseOn == this) MouseOn = null;
}
}
foreach (GUIComponent child in children)