Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 6, 2010, 1:11:43 PM (15 years ago)
Author:
dafrick
Message:

Made noCaption feature needed for skybox much nice. :D

Location:
code/branches/skybox2/src/modules
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/skybox2/src/modules/designtools/SkyboxGenerator.cc

    r6806 r6858  
    6060        this->setConfigValues();
    6161        takeScreenshot_ = false;
     62        this->captionsRemoved_ = false;
    6263    }
    6364
     
    7677        if( takeScreenshot_ == true )
    7778        {
     79            if(!this->captionsRemoved_)
     80            {
     81                CommandExecutor::execute("setGametypeStatus false");
     82                this->captionsRemoved_ = true;
     83                return;
     84            }
     85           
    7886            ControllableEntity* ce = HumanController::getLocalControllerSingleton()->getControllableEntity();
    7987            Camera* camera = ce->getCamera();
     
    8189       
    8290            Ogre::RenderWindow* w = GraphicsManager::getInstance().getRenderWindow();
     91
    8392
    8493            switch (iterateOverDirections_)
     
    131140                camera->getOgreCamera()->setAspectRatio(aspectRatio_);
    132141                camera->getOgreCamera()->setFOVy(fovy_);
     142                iterateOverDirections_++;
     143            case 8 :
    133144                iterateOverDirections_ =0;
    134145                takeScreenshot_ = false;
    135146                CommandExecutor::execute("pause");
     147                CommandExecutor::execute("setGametypeStatus true");
     148                this->captionsRemoved_ = false;
    136149            }
     150
    137151        }
    138152    }
  • code/branches/skybox2/src/modules/designtools/SkyboxGenerator.h

    r6804 r6858  
    5454            float aspectRatio_;
    5555            Ogre::Radian fovy_;
     56            bool captionsRemoved_;
    5657    };
    5758}
  • code/branches/skybox2/src/modules/overlays/hud/GametypeStatus.cc

    r6772 r6858  
    3030
    3131#include "util/Convert.h"
    32 #include "core/Core.h"
     32#include "core/ConsoleCommand.h"
    3333#include "core/CoreIncludes.h"
    3434#include "infos/GametypeInfo.h"
     
    3939namespace orxonox
    4040{
    41     CreateFactory(GametypeStatus);
     41    CreateFactory(GametypeStatus); 
     42
     43    /*static*/ bool GametypeStatus::noCaption_s = false;
     44    SetConsoleCommand(GametypeStatus, setGametypeStatus, true);
    4245
    4346    GametypeStatus::GametypeStatus(BaseObject* creator) : OverlayText(creator)
     
    6164            ControllableEntity* ce = this->owner_->getControllableEntity();
    6265
    63             if(!Core::getInstance().hasGametypeCaptions()) // No captions are displayed.
     66            if(GametypeStatus::noCaption_s) // No captions are displayed.
     67            {
     68                this->setCaption("");
    6469                return;
     70            }
    6571
    6672            if (!gtinfo->hasStarted() && !gtinfo->isStartCountdownRunning())
     
    9298        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
    9399    }
     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   
    94112}
  • code/branches/skybox2/src/modules/overlays/hud/GametypeStatus.h

    r5781 r6858  
    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.