Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2010, 10:31:25 PM (14 years ago)
Author:
scheusso
Message:

merged skybox2 branch to presentation merger branch

Location:
code/branches/presentation3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3

  • code/branches/presentation3/src/modules/overlays/hud/GametypeStatus.cc

    r5781 r6994  
    3030
    3131#include "util/Convert.h"
     32#include "core/ConsoleCommand.h"
    3233#include "core/CoreIncludes.h"
    3334#include "infos/GametypeInfo.h"
     
    3839namespace orxonox
    3940{
    40     CreateFactory(GametypeStatus);
     41    CreateFactory(GametypeStatus); 
     42
     43    /*static*/ bool GametypeStatus::noCaption_s = false;
     44    SetConsoleCommand(GametypeStatus, setGametypeStatus, true);
    4145
    4246    GametypeStatus::GametypeStatus(BaseObject* creator) : OverlayText(creator)
     
    5963            const GametypeInfo* gtinfo = this->owner_->getGametypeInfo();
    6064            ControllableEntity* ce = this->owner_->getControllableEntity();
     65
     66            if(GametypeStatus::noCaption_s) // No captions are displayed.
     67            {
     68                this->setCaption("");
     69                return;
     70            }
    6171
    6272            if (!gtinfo->hasStarted() && !gtinfo->isStartCountdownRunning())
     
    8898        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
    8999    }
     100
     101    /**
     102    @brief
     103        Sets whether the gametype status is displayed.
     104    @param bValue
     105        If true captions are displayed, if false, not.
     106    */
     107    /*static*/ void GametypeStatus::setGametypeStatus(bool bValue)
     108    {
     109        GametypeStatus::noCaption_s = !bValue;
     110    }
     111   
    90112}
  • code/branches/presentation3/src/modules/overlays/hud/GametypeStatus.h

    r5781 r6994  
    4646            virtual void changedOwner();
    4747
     48            static void setGametypeStatus(bool bValue); //!< Toggles whether the gametype status is displayed.
     49
    4850        private:
    4951            PlayerInfo* owner_;
     52            static bool noCaption_s;
     53           
    5054    };
    5155}
Note: See TracChangeset for help on using the changeset viewer.