Improved map rendering, shops, light bugfix, junction boxes wont break as easily

This commit is contained in:
Regalis
2015-07-27 23:45:20 +03:00
parent 4238301ad3
commit 7155f1cef0
37 changed files with 472 additions and 300 deletions

View File

@@ -298,9 +298,9 @@ namespace Subsurface
public virtual void DrawChildren(SpriteBatch spriteBatch)
{
foreach (GUIComponent child in children)
for (int i = 0; i < children.Count; i++ )
{
child.Draw(spriteBatch);
children[i].Draw(spriteBatch);
}
}

View File

@@ -280,7 +280,10 @@ namespace Subsurface
Debug.WriteLine("clicked");
selected = child;
if (OnSelected != null)
OnSelected(child.UserData);
{
if (!OnSelected(child.UserData)) selected = null;
}
}
}
else