Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 7, 2016, 5:08:11 PM (9 years ago)
Author:
patricwi
Message:

visualization of pickup system initiated. next steps: add pickup icons when picked up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/HUD_HS16/src/modules/overlays/hud/HUDPickupItem.cc

    r11264 r11277  
    2929#include "HUDPickupItem.h"
    3030
     31#include <string>
     32
     33
     34#include <OgreOverlayManager.h>
     35#include <OgrePanelOverlayElement.h>
     36
    3137#include "core/CoreIncludes.h"
    3238#include "core/XMLPort.h"
    3339#include "util/Convert.h"
    3440#include "core/class/Super.h"
     41#include "HUDPickupItem.h"
    3542
    3643namespace orxonox
    3744{
    3845    RegisterClass(HUDPickupItem);
     46    Ogre::PanelOverlayElement* overlayElement_;
    3947
    4048    HUDPickupItem::HUDPickupItem(Context* context) : OrxonoxOverlay(context)
     
    4351
    4452        overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDPickupItem" + getUniqueNumberString()));
    45         overlayElement_->setMaterialName("Orxonox/WSHUD_Weapon");   //TODO be switched
     53       
    4654        overlayElement_->setPosition(0.0f,0.0f);
    47         overlayElement_->setDimensions(1.0f,1.0f);
     55        overlayElement_->setDimensions(0.5f,0.5f);
    4856        this->background_->addChild(overlayElement_);
    4957    }
     
    5361        if (this->isInitialized())
    5462        {
    55             destroyHUDChilds();
     63            overlayElement_=nullptr;
    5664        }
     65    }
     66
     67    void initializeMaterial(std::string s)
     68    {
     69        overlayElement_->setMaterialName(s);
    5770    }
    5871
Note: See TracChangeset for help on using the changeset viewer.