Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

latest changes because of linker

File size: 2.4 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
40namespace orxonox
41{
42    RegisterClass(HUDPickupSystem);
43
44    HUDPickupSystem::HUDPickupSystem(Context* context) : OrxonoxOverlay(context)
45    {
46        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 here is the HUDPickupSystem" << endl;
53        this->background_->addChild(overlayElement_);
54
55    }
56
57    HUDPickupSystem::~HUDPickupSystem()
58    {
59        if (this->isInitialized())
60        {
61            //TODO: Destroy me
62        }
63    }
64
65   //TODO: XMLPort
66
67    void HUDPickupSystem::updatePickupList(std::vector<WeakPtr<Pickup>> picks)
68    {
69        for(Pickup* p : picks)
70        {
71            HUDPickupItem* item = new HUDPickupItem(this->getContext());
72            // item->initializeMaterial(p->getRepresentationName());
73            item->printHello();
74        }
75    }
76
77    void HUDPickupSystem::createPickupList()
78    {
79     
80    }     
81
82    void HUDPickupSystem::destroyAll()
83    {
84       
85    }
86}
Note: See TracBrowser for help on using the repository browser.