Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 7, 2016, 5:08:11 PM (8 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/HUDPickupSystem.cc

    r11263 r11277  
    2727 */
    2828
     29#include <vector>
     30#include <string>
     31
    2932#include "core/CoreIncludes.h"
    3033#include "core/XMLPort.h"
    3134#include "util/Convert.h"
    3235#include "core/class/Super.h"
     36#include "HUDPickupSystem.h"
     37#include "pickup/Pickup.h"
     38#include "HUDPickupItem.h"
    3339
    3440namespace orxonox
     
    3945    {
    4046        RegisterObject(HUDPickupSystem);
     47
     48        overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDPickupSystem" + getUniqueNumberString()));
     49        overlayElement_->setMaterialName("PickupBar");
     50        overlayElement_->setPosition(0.0f,0.0f);
     51        overlayElement_->setDimensions(0.70f,0.15f);
     52        orxout() << "hello HUDPickupSystem" << endl;
     53        this->background_->addChild(overlayElement_);
    4154
    4255    }
     
    5265   //TODO: XMLPort
    5366
    54     void HUDPickupSystem::updatePickupList()
     67    void HUDPickupSystem::updatePickupList(std::vector<Pickup> picks)
    5568    {
    56        
     69        for(Pickup p : picks)
     70        {
     71            HUDPickupItem item = new HUDPickupItem(this->getContext());
     72            item.initializeMaterial(p.getRepresentationName());
     73        }
    5774    }
    5875
Note: See TracChangeset for help on using the changeset viewer.