Show
Ignore:
Timestamp:
11/27/08 18:00:11 (5 years ago)
Author:
cedricpinson
Message:

bug i need you jeremy :)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/branches/OpenSceneGraph-osgWidget-dev/examples/osgwidgetmessagebox/osgwidgetmessagebox.cpp

    r9277 r9279  
    318318 
    319319    wm->addChild(message.getWindow()); 
     320 
     321    // center 
     322    osgWidget::point_type w = wm->getWidth(); 
     323    osgWidget::point_type h = wm->getHeight(); 
     324    osgWidget::point_type ww = message.getWindow()->getWidth(); 
     325    osgWidget::point_type hw = message.getWindow()->getHeight(); 
     326    osgWidget::point_type ox = (w - ww) / 2; 
     327    osgWidget::point_type oy = (h - hw) / 2; 
     328    message.getWindow()->setPosition(osgWidget::Point(ox, oy, message.getWindow()->getPosition()[2] )); 
    320329//    frame->resizeAdd(30, 30); 
    321330