| 1156 | } |
| 1157 | |
| 1158 | void GuiMenuBar::addObject(SimObject* object) |
| 1159 | { |
| 1160 | PopupMenu* popup = dynamic_cast<PopupMenu*>(object); |
| 1161 | |
| 1162 | if (!popup) |
| 1163 | { |
| 1164 | //if it's not a popup, handle it normally |
| 1165 | Parent::addObject(object); |
| 1166 | } |
| 1167 | else |
| 1168 | { |
| 1169 | //otherwise, if it IS a popup, don't add it as a child object, but instead just insert it as a menu entry |
| 1170 | insert(object, -1); |
| 1171 | } |
| 1172 | } |
| 1173 | |
| 1174 | GuiMenuBar::MenuEntry *GuiMenuBar::findHitMenu(Point2I mousePoint) |
| 1175 | { |