Changeset 1502 for code/trunk/src/orxonox/hud/BarOverlayElement.cc
- Timestamp:
- Jun 1, 2008, 3:54:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/hud/BarOverlayElement.cc
r1407 r1502 1 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * 4 * 5 * License notice: 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * Author: 22 * Yuning Chai 23 * Co-authors: 24 * Felix Schulthess 25 * 26 */ 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < 4 * 5 * 6 * License notice: 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 * 22 * Author: 23 * Yuning Chai 24 * Co-authors: 25 * Felix Schulthess 26 * 27 */ 27 28 29 #include "OrxonoxStableHeaders.h" 30 #include "BarOverlayElement.h" 28 31 #include <OgreOverlayManager.h> 29 #include <OgreOverlayElement.h>30 #include <OgrePanelOverlayElement.h>31 32 #include "GraphicsEngine.h" 32 #include "BarOverlayElement.h"33 33 34 34 namespace orxonox 35 35 { 36 using namespace Ogre;36 using namespace Ogre; 37 37 38 BarOverlayElement::BarOverlayElement(const String& name): Ogre::PanelOverlayElement(name){38 BarOverlayElement::BarOverlayElement(const String& name):PanelOverlayElement(name){ 39 39 name_ = name; 40 40 } … … 42 42 BarOverlayElement::~BarOverlayElement(){} 43 43 44 void BarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, O gre::OverlayContainer* container){44 void BarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, OverlayContainer* container){ 45 45 // init some values... 46 46 container_ = container; 47 om = &O gre::OverlayManager::getSingleton();47 om = &OverlayManager::getSingleton(); 48 48 value_ = 0; 49 49 color_ = 2; … … 53 53 topRel_ = topRel; 54 54 dimRel_ = dimRel; 55 55 56 56 // create background... 57 57 background_ = static_cast<OverlayContainer*>(om->createOverlayElement("Panel", name_+"container")); 58 58 background_->show(); 59 59 container_->addChild(background_); 60 background_->setMetricsMode( Ogre::GMM_PIXELS);60 background_->setMetricsMode(GMM_PIXELS); 61 61 background_->setMaterialName("Orxonox/BarBackground"); 62 62 … … 65 65 66 66 show(); 67 setMetricsMode( Ogre::GMM_PIXELS);67 setMetricsMode(GMM_PIXELS); 68 68 setMaterialName("Orxonox/Green"); 69 69 background_->addChild(this); … … 126 126 } 127 127 } 128 129
Note: See TracChangeset
for help on using the changeset viewer.