Changeset 823 for code/branches
- Timestamp:
- Feb 17, 2008, 5:42:44 PM (17 years ago)
- Location:
- code/branches/hud
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/cmake/FindOGRE.cmake
r790 r823 7 7 # OGRE_FOUND, If false, do not try to use OGRE 8 8 # 9 # Copyright ©2007, Matt Williams9 # Copyright � 2007, Matt Williams 10 10 # Modified by Nicolas Schlumberger to make it work on the Tardis-Infrastucture of the ETH Zurich 11 11 # … … 18 18 IF (WIN32) #Windows 19 19 MESSAGE(STATUS "Looking for OGRE") 20 SET(OGRE_INCLUDE_DIR ../libs/ogre/OgreMain/include)21 SET(OGRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ ../libs/ogre/Samples/Common/bin/Release)20 SET(OGRE_INCLUDE_DIR /usr/include/OGRE ../libs/ogre/OgreMain/include) 21 SET(OGRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/usr/include/OGRE ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release) 22 22 SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain) 23 23 ELSE (WIN32) #Unix 24 24 FIND_PACKAGE(PkgConfig) 25 PKG_SEARCH_MODULE(OGRE OGRE /usr/ pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig/OGRE.pc) # tardis specific hack25 PKG_SEARCH_MODULE(OGRE OGRE /usr/include/OGRE /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig/OGRE.pc) # tardis specific hack 26 26 SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIRS}) 27 27 SET(OGRE_LIB_DIR ${OGRE_LIBDIR}) -
code/branches/hud/src/orxonox/Orxonox.cc
r790 r823 43 43 #include <OgreConfigFile.h> 44 44 #include <OgreOverlay.h> 45 #include <OgreOverlayContainer.h> 45 46 #include <OgreOverlayManager.h> 46 47 … … 73 74 #include "core/Debug.h" 74 75 #include "hud/HUD.h" 76 #include "hud/Bar.h" 75 77 #include "objects/weapon/BulletManager.h" 76 78 #include "GraphicsEngine.h" … … 382 384 loader_->loadLevel(); 383 385 384 Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2"); 385 HUD* orxonoxHud; 386 orxonoxHud = new HUD(); 387 orxonoxHud->setEnergyValue(20); 388 orxonoxHud->setEnergyDistr(20,20,60); 386 // Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2"); 387 // Ogre::OverlayContainer* cont = Ogre::OverlayManager::createOverlayElement("Orxonox/HUD1.2/MyShip", "Orxonox/HUD1.2/shieldLeftTop", false); 388 // Ogre::OverlayContainer* cont = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2/MapBackGround"); 389 390 // hud::Bar* newBar = Ogre::OverlayManager::createOverlayElement("Element", "ElementName"); 391 //new hud::Bar(1,true,Ogre::ColourValue::Black,"Orxonox/hi"); 392 // cont->addChild(newBar-> element_); 393 // hud::Bar* newBar = Ogre::OverlayManager::createOverlayElement("orxonox/bar", "orxonox/newbar", false); 394 395 396 Ogre::OverlayManager& overlayManager = Ogre::OverlayManager::getSingleton(); 397 398 Ogre::Overlay* hudOverlay = overlayManager.create("orxonoxsuperoverlay"); 399 400 hud::Bar* newBar = static_cast<hud::Bar*>(overlayManager.createOverlayElement("Panel", "Bar")); 401 newBar->setLeft(0); 402 newBar->setTop(0); 403 newBar->setWidth(10); 404 newBar->setHeight(10); 405 newBar->setMaterialName("Orxonox/Red"); 406 newBar->setMetricsMode(Ogre::GMM_PIXELS); 407 newBar->setPercentage(0.8); 408 newBar->show(); 409 410 411 Ogre::OverlayContainer* panel = static_cast<Ogre::OverlayContainer*> (overlayManager.createOverlayElement("Panel", "PanelName")); 412 panel->setLeft(10); 413 panel->setTop(10); 414 panel->setWidth(100); 415 panel->setHeight(100); 416 panel->setMetricsMode(Ogre::GMM_PIXELS); 417 panel->show(); 418 419 hudOverlay->add2D(panel); 420 panel->addChild(newBar); 421 422 // HUD* orxonoxHud; 423 // orxonoxHud = new HUD(); 424 // orxonoxHud->setEnergyValue(20); 425 // orxonoxHud->setEnergyDistr(20,20,60); 389 426 hudOverlay->show(); 427 390 428 391 429 /* -
code/branches/hud/src/orxonox/hud/HUD.cc
r790 r823 33 33 34 34 #include "HUD.h" 35 #include "Bar.h" 35 36 36 37
Note: See TracChangeset
for help on using the changeset viewer.