Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 28, 2006, 12:07:51 PM (18 years ago)
Author:
bensch
Message:

event-listening

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/gui/gl/glgui_fixedposition_box.cc

    r9549 r9554  
    2828  GLGuiFixedpositionBox::GLGuiFixedpositionBox (OrxGui::Position position, OrxGui::Orientation orientation)
    2929      : GLGuiBox(orientation)
    30   {}
     30  {
     31    this->subscribeEvent(ES_ALL, EV_VIDEO_RESIZE);
     32  }
    3133
    3234
     
    4547    {
    4648      case OrxGui::Center:
    47         this->setAbsCoor2D(GLGuiHandler::getInstance()->resolution() - this->getSize2D() / 2.0);
     49        this->setAbsCoor2D(GLGuiHandler::getInstance()->resolution()/2.0 - this->getSize2D() / 2.0);
    4850        break;
    4951      default:
     
    5658  }
    5759
     60  void GLGuiFixedpositionBox::process(const Event& event)
     61  {
     62    switch(event.type)
     63    {
     64      case EV_VIDEO_RESIZE:
     65        this->resize();
     66        break;
     67
     68    }
     69
     70  }
     71
     72
    5873}
Note: See TracChangeset for help on using the changeset viewer.