Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/HUD_HS16/src/modules/overlays/hud/HUDPickupSystem.cc @ 11305

Last change on this file since 11305 was 11305, checked in by patricwi, 7 years ago

linker error

File size: 2.5 KB
Line 
1/*
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 *      Patrick Wintermeyer
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#include <vector>
30#include <string>
31
32#include "core/CoreIncludes.h"
33#include "core/XMLPort.h"
34#include "util/Convert.h"
35#include "core/class/Super.h"
36#include "HUDPickupSystem.h"
37#include "pickup/Pickup.h"
38#include "HUDPickupItem.h"
39#include "pickup/PickupManager.h"
40
41namespace orxonox
42{
43    RegisterClass(HUDPickupSystem);
44
45    HUDPickupSystem::HUDPickupSystem(Context* context) : OrxonoxOverlay(context)
46    {
47        RegisterObject(HUDPickupSystem);
48
49        overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDPickupSystem" + getUniqueNumberString()));
50        overlayElement_->setMaterialName("PickupBar");
51        overlayElement_->setPosition(0.0f,0.0f);
52        overlayElement_->setDimensions(0.70f,0.15f);
53        orxout() << "hello here is the HUDPickupSystem" << endl;
54        this->background_->addChild(overlayElement_);
55
56        PickupManager::getInstance().setPickupSystem(this);
57    }
58
59    HUDPickupSystem::~HUDPickupSystem()
60    {
61        if (this->isInitialized())
62        {
63            //TODO: Destroy me
64        }
65    }
66
67   //TODO: XMLPort
68
69    void HUDPickupSystem::updatePickupList(std::vector<Pickupable*> picks)
70    {
71        for(Pickupable* p : picks)
72        {
73            HUDPickupItem* item = new HUDPickupItem(this->getContext());
74            item->initializeMaterial(((Pickup*)p)->getRepresentationName());
75            item->printHello();
76        }
77    }
78
79    void HUDPickupSystem::createPickupList()
80    {
81     
82    }     
83
84    void HUDPickupSystem::destroyAll()
85    {
86       
87    }
88}
Note: See TracBrowser for help on using the repository browser.