void Widget::Select(float x, float y) { if (HasFlag(Flags::kSelectable)) { Rect * rect = dynamic_cast<Rect*>(this); if (rect) active_ = rect->IsInsideGlobal(x, y); } }