/// <summary>
/// Invalidate the panel's draw calls, forcing them to be rebuilt on the next update.
/// This call also affects all child panels.
/// </summary>
public void SetDirty()
{
for (int i = 0; i < UIDrawCall.list.size; ++i)
{
UIDrawCall dc = UIDrawCall.list[i];
if (dc != null && dc.manager == this)
{
dc.isDirty = true;
}
}
for (int i = 0; i < UIWidget.list.size; ++i)
{
UIWidget w = UIWidget.list[i];
if (w.panel == this)
{
w.MarkAsChangedLite();
}
}
for (int i = 0; i < list.size; ++i)
{
UIPanel p = list[i];
if (p != null && p != this && p.parent == this)
{
p.SetDirty();
}
}
}