misc UI stuff, gamesession additions, limbs don't have individual health anymore, background music

This commit is contained in:
Regalis
2015-06-09 18:18:34 +03:00
parent d3896383fd
commit d7fde606e9
50 changed files with 595 additions and 282 deletions
+18 -5
View File
@@ -142,14 +142,27 @@ namespace Subsurface
return null;
}
public bool IsParentOf(GUIComponent component)
{
foreach (GUIComponent child in children)
{
if (child == component) return true;
if (child.IsParentOf(component)) return true;
}
return false;
}
public virtual void Draw(SpriteBatch spriteBatch)
{
Color newColor = color;
if (state == ComponentState.Selected) newColor = selectedColor;
if (state == ComponentState.Hover) newColor = hoverColor;
GUI.DrawRectangle(spriteBatch, rect, newColor*alpha, true);
DrawChildren(spriteBatch);
//Color newColor = color;
//if (state == ComponentState.Selected) newColor = selectedColor;
//if (state == ComponentState.Hover) newColor = hoverColor;
//GUI.DrawRectangle(spriteBatch, rect, newColor*alpha, true);
//DrawChildren(spriteBatch);
}
public virtual void Update(float deltaTime)