| 233 | } |
| 234 | |
| 235 | void UISceneNode::windowAdd( UIWindow* win ) { |
| 236 | if ( !windowExists( win ) ) { |
| 237 | mWindowsList.insert( mWindowsList.begin(), win ); |
| 238 | WindowEvent wevent( this, win, Event::OnWindowAdded ); |
| 239 | sendEvent( &wevent ); |
| 240 | } else { |
| 241 | //! Send to front |
| 242 | auto found = std::find( mWindowsList.begin(), mWindowsList.end(), win ); |
| 243 | if ( found != mWindowsList.end() ) { |
| 244 | mWindowsList.erase( found ); |
| 245 | mWindowsList.insert( mWindowsList.begin(), win ); |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | void UISceneNode::windowRemove( UIWindow* win ) { |
| 251 | if ( windowExists( win ) ) { |