Add Dispose support to widget logic objects.

This commit is contained in:
Paul Chote
2015-10-10 14:18:25 +01:00
parent 426e187a4c
commit 4ba78f65b9
2 changed files with 32 additions and 1 deletions

View File

@@ -56,6 +56,12 @@ namespace OpenRA.Mods.Common.Widgets
// This is crap
public override int UsableWidth { get { return Bounds.Width - Bounds.Height; } } /* space for button */
public override void Hidden()
{
base.Hidden();
RemovePanel();
}
public override void Removed()
{
base.Removed();