[Orxonox-commit 5187] r9852 - code/branches/radarDreiD/src/modules/overlays/hud
wroennin at orxonox.net
wroennin at orxonox.net
Mon Dec 2 15:42:24 CET 2013
Author: wroennin
Date: 2013-12-02 15:42:24 +0100 (Mon, 02 Dec 2013)
New Revision: 9852
Modified:
code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc
Log:
fixed showing bug of the two overlay elements
Modified: code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc 2013-12-02 14:38:43 UTC (rev 9851)
+++ code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc 2013-12-02 14:42:24 UTC (rev 9852)
@@ -74,18 +74,12 @@
.createOverlayElement("Panel", "HUDRadar_mapDreiDFront_" + getUniqueNumberString()));
this->map3DFront_->setMaterialName("Orxonox/Radar3DFront");
this->overlay_->add2D(this->map3DFront_);
- //this->map3DFront_->_setDimensions(0.17f, 0.17f);
- //this->map3DFront_->_setPosition(1.0, 1.0);
- //this->map3DFront_->_notifyZOrder(this->overlay_->getZOrder() * 100 + 10);
this->map3DFront_->hide();
this->map3DBack_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
.createOverlayElement("Panel", "HUDRadar_mapDreiDBack_" + getUniqueNumberString()));
this->map3DBack_->setMaterialName("Orxonox/Radar3DBack");
this->overlay_->add2D(this->map3DBack_);
- //this->map3DBack_->_setDimensions(0.17f, 0.17f);
- //this->map3DBack_->_setPosition(1.0, 1.0);
- //this->map3DBack_->_notifyZOrder(this->overlay_->getZOrder() * 100 - 10);
this->map3DBack_->hide();
}
@@ -198,15 +192,18 @@
if(RadarMode_)
{
this->setBackgroundMaterial(material3D_);
+ this->map3DFront_->_notifyZOrder(this->overlay_->getZOrder() * 100 + 10);
+ this->map3DBack_->_notifyZOrder(this->overlay_->getZOrder() * 100 - 10);
this->map3DFront_->show();
this->map3DBack_->show();
}
else
+ {
this->setBackgroundMaterial(material2D_);
this->map3DFront_->hide();
this->map3DBack_->hide();
+ }
-
for( it = this->radarObjects_.begin(); it != this->radarObjects_.end(); ++it )
{
// Make sure the object really is a WorldEntity
More information about the Orxonox-commit
mailing list