Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6441 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Jan 8, 2006, 4:02:30 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: the Hud now scales the Widgets itself

Location:
trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/player.cc

    r6440 r6441  
    3838
    3939  this->controllable = NULL;
    40   this->hud = new Hud();
     40  this->hud.show();
    4141
    4242  EventHandler::getInstance()->subscribe(this, ES_GAME, SDLK_l);
     
    4949Player::~Player ()
    5050{
    51   delete this->hud;
    5251
    5352}
     
    5958  {
    6059      this->controllable = controllable;
    61       this->hud->setEnergyWidget(this->controllable->getEnergyWidget());
     60      this->hud.setEnergyWidget(this->controllable->getEnergyWidget());
    6261      return true;
    6362  }
     
    7372   {
    7473     this->controllable = NULL;
    75      this->hud->setEnergyWidget(NULL);
     74     this->hud.setEnergyWidget(NULL);
    7675     return true;
    7776   }
  • trunk/src/world_entities/player.h

    r6440 r6441  
    99#include "event_listener.h"
    1010
     11#include "util/hud.h"
     12
    1113/* Forward Declaration */
    1214class Playable;
    13 class Hud;
     15
    1416
    1517//! Basic controllable WorldEntity
     
    3638  private:
    3739    Playable*         controllable;                  //!< The one we controll or NULL if none
    38     Hud*              hud;                           //!< The HUD to be displayed.
     40    Hud               hud;                           //!< The HUD to be displayed for this Player.
    3941};
    4042
Note: See TracChangeset for help on using the changeset viewer.