Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9554 in orxonox.OLD


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

event-listening

Location:
branches/proxy/src/lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/BuildLibs.am

    r9552 r9554  
    33                $(LIB_PREFIX)/util/libORXlibutil.a \
    44                $(LIB_PREFIX)/shell/libORXshell.a \
     5                $(LIB_PREFIX)/event/libORXevent.a \
    56                $(LIB_PREFIX)/gui/qt/libORXqtgui.a \
    67                $(LIB_PREFIX)/gui/gl/libORXglgui.a \
     
    1112                $(LIB_PREFIX)/graphics/importer/libtc.a \
    1213                $(LIB_PREFIX)/sound/libORXsound.a \
    13                 $(LIB_PREFIX)/event/libORXevent.a \
    1414                $(LIB_PREFIX)/particles/libORXparticles.a \
    1515                $(LIB_PREFIX)/collision_detection/libORXcd.a \
  • 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}
  • branches/proxy/src/lib/gui/gl/glgui_fixedposition_box.h

    r9549 r9554  
    88
    99#include "glgui_box.h"
     10#include "event_listener.h"
    1011
    1112namespace OrxGui
     
    1516   *
    1617   */
    17   class GLGuiFixedpositionBox : public OrxGui::GLGuiBox
     18  class GLGuiFixedpositionBox : public OrxGui::GLGuiBox, EventListener
    1819  {
    1920
     
    2627    protected:
    2728      virtual void resize();
     29      virtual void process(const Event& event); //!< from eventListener
    2830
    2931    private:
  • branches/proxy/src/lib/gui/gl/glgui_handler.cc

    r9546 r9554  
    4444    this->setName("GLGuiHandler");
    4545
     46    this->_resolution = Vector2D(GraphicsEngine::getInstance()->getResolutionX(), GraphicsEngine::getInstance()->getResolutionY());
    4647
    4748    EventHandler::getInstance()->withUNICODE(ES_MENU, true );
     
    9192  void GLGuiHandler::activate()
    9293  {
    93     this->_resolution = Vector2D(GraphicsEngine::getInstance()->getResolutionX(), GraphicsEngine::getInstance()->getResolutionY());
    9494    //EventHandler::getInstance()->pushState(ES_MENU);
    9595
  • branches/proxy/src/lib/network/monitor/network_monitor.cc

    r9494 r9554  
    211211
    212212    this->box->showAll();
    213     this->box->setAbsCoor2D(300, 40);
     213    //this->box->setAbsCoor2D(300, 40);
    214214  }
    215215  else
  • branches/proxy/src/lib/network/monitor/network_stats_widget.cc

    r9552 r9554  
    147147 */
    148148NetworkStatsWidget::NetworkStatsWidget(const NetworkMonitor* monitor)
    149   : GLGuiFixedpositionBox(OrxGui::Center, OrxGui::Vertical), _thisHost("myName", IP(127, 0, 0 , 1))
     149  : OrxGui::GLGuiFixedpositionBox(OrxGui::Center, OrxGui::Vertical), _thisHost("myName", IP(127, 0, 0 , 1))
    150150{
    151151  this->_monitor = monitor;
Note: See TracChangeset for help on using the changeset viewer.