| 100 | } |
| 101 | |
| 102 | void Container::RemoveWidget(Widget* w){ |
| 103 | w->SetParent(nullptr); |
| 104 | w->window = nullptr; |
| 105 | |
| 106 | if(active == w) active = nullptr; |
| 107 | |
| 108 | children.erase(std::remove(children.begin(), children.end(), w), children.end()); |
| 109 | } |
| 110 | |
| 111 | void Container::Paint(surface_t* surface){ |
| 112 | if(background.a == 255) Graphics::DrawRect(fixedBounds, background, surface); |