Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9656 in orxonox.OLD for trunk/src/lib/gui/gl/glgui_handler.cc


Ignore:
Timestamp:
Aug 4, 2006, 11:01:28 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy bache back with no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl/glgui_handler.cc

    r9240 r9656  
    2828#include "debug.h"
    2929
    30 #include <cassert>
    31 
    3230
    3331/// TAKE THIS OUT OF HERE.
     
    4644    this->setName("GLGuiHandler");
    4745
     46    this->_resolution = Vector2D(GraphicsEngine::getInstance()->getResolutionX(), GraphicsEngine::getInstance()->getResolutionY());
    4847
    4948    EventHandler::getInstance()->withUNICODE(ES_MENU, true );
     
    5251    for (unsigned int i = 0; i < EV_NUMBER; i++)
    5352    {
    54       this->subscribeEvent(ES_ALL, i);
     53      this->subscribeEvent(ES_GAME, i);
     54      this->subscribeEvent(ES_GAME_MENU, i);
     55      this->subscribeEvent(ES_MENU, i);
    5556    }
    5657  }
     
    8889      this->_cursor = NULL;
    8990    }
     91  }
     92
     93  const Vector2D& GLGuiHandler::resolution()
     94  {
     95    if (this->_resolution == Vector2D::nullVector())
     96      this->_resolution = Vector2D(GraphicsEngine::getInstance()->getResolutionX(), GraphicsEngine::getInstance()->getResolutionY());
     97    return _resolution;
    9098  }
    9199
     
    244252        if (this->_cursor != NULL)
    245253          this->_cursor->setMaxBorders(Vector2D(event.resize.w, event.resize.h));
    246         break;
     254        this->_resolution = Vector2D(event.resize.w, event.resize.h);
     255        break;
     256
    247257      case SDLK_TAB:
    248258        if (event.bPressed)
Note: See TracChangeset for help on using the changeset viewer.