Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 6, 2018, 2:01:20 AM (7 years ago)
Author:
landauf
Message:

[HUD_HS16] removed a lot of unused stuff

Location:
code/trunk/src/modules/overlays/hud
Files:
4 edited

Legend:

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

    r11701 r11702  
    3636
    3737#include "core/CoreIncludes.h"
    38 #include "core/XMLPort.h"
    39 #include "util/Convert.h"
    4038#include "core/class/Super.h"
     39#include "util/StringUtils.h"
    4140#include "HUDPickupItem.h"
    4241
     
    6867    }
    6968
    70     void HUDPickupItem::hideMe(Pickupable* p, bool repaint)
     69    void HUDPickupItem::hideMe()
    7170    {
    72         if(!repaint) return;                     //dont do anything, if we are not allowed to repaint because the level is terminating
    73         assert(overlayElement_);
    74         assert(this->background_);
    7571        //overlayElement_->hide();
    7672        this->background_->removeChild(overlayElement_->getName());
  • code/trunk/src/modules/overlays/hud/HUDPickupItem.h

    r11353 r11702  
    55#include "overlays/OverlaysPrereqs.h"
    66
    7 #include <map>
    8 #include <vector>
    9 #include <string>
    10 
    11 #include <OgreOverlayManager.h>
    12 #include <OgrePanelOverlayElement.h>
    13 
     7#include "util/OgreForwardRefs.h"
    148#include "overlays/OrxonoxOverlay.h"
    15 #include "tools/interfaces/Tickable.h"
    16 #include "worldentities/pawns/Pawn.h"
    17 #include "overlays/OverlayGroup.h"
    18 #include "pickup/Pickup.h"
    199
    2010namespace orxonox
    2111{
    22     class _OverlaysExport HUDPickupItem : public OrxonoxOverlay, public Tickable
     12    class _OverlaysExport HUDPickupItem : public OrxonoxOverlay
    2313    {
    2414    public:
    2515        HUDPickupItem(Context* context);
    26         Ogre::PanelOverlayElement* overlayElement_;
    2716        virtual ~HUDPickupItem();
    2817       
    2918        void initializeMaterial(const std::string& s, float x, float y); 
    30         void hideMe(Pickupable* p, bool repaint);
     19        void hideMe();
    3120
    32     private:       
    33         WeakPtr<Pawn> owner_;
    34         WeakPtr<Pickup> pickup_;
    35 
     21    private:
     22        Ogre::PanelOverlayElement* overlayElement_;
    3623    };
    3724}
  • code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc

    r11701 r11702  
    3030#include <string>
    3131
     32#include <OgreOverlayManager.h>
     33#include <OgrePanelOverlayElement.h>
     34
    3235#include "core/CoreIncludes.h"
    33 #include "core/XMLPort.h"
    34 #include "util/Convert.h"
    3536#include "core/class/Super.h"
     37#include "util/StringUtils.h"
    3638#include "HUDPickupSystem.h"
     39#include "HUDPickupItem.h"
    3740#include "pickup/Pickup.h"
    38 #include "HUDPickupItem.h"
    3941#include "pickup/PickupManager.h"
    4042
     
    6870        //hide all pickup symbols in HUD and delete from local map
    6971       
    70         for(const auto& sm_pair : picks)
     72        for(HUDPickupItem* item : items_)
    7173        {
    72             sm_pair.second->hideMe(sm_pair.first, repaint);
     74            item->hideMe();
    7375        }
    7476
    75         picks.clear();
    76         assert(picks.empty()); //picks must be empty now
     77        items_.clear();
     78        assert(items_.empty()); //items_ must be empty now
    7779
    7880        //add to local map and place on screen
     
    9597            item->initializeMaterial(this->getIcon(((Pickup*)pickup)->getRepresentationName()), offsetX+i*x, offsetY);
    9698            item->setOverlayGroup(this->getOverlayGroup());
    97             picks[pickup] = item;
     99            items_.push_back(item);
    98100        }
    99     }
    100 
    101    
    102     void HUDPickupSystem::destroyAll()
    103     {
    104         this->background_->removeChild(overlayElement_->getName());
    105101    }
    106102
  • code/trunk/src/modules/overlays/hud/HUDPickupSystem.h

    r11700 r11702  
    3333#include "overlays/OverlaysPrereqs.h"
    3434
    35 #include <map>
    3635#include <vector>
    37 #include <string>
    3836
    39 
    40 #include <OgreOverlayManager.h>
    41 #include <OgrePanelOverlayElement.h>
    42 
     37#include "util/OgreForwardRefs.h"
    4338#include "overlays/OrxonoxOverlay.h"
    44 #include "worldentities/pawns/Pawn.h"
    45 #include "overlays/OverlayGroup.h"
    46 #include "pickup/Pickup.h"
    47 #include "pickup/PickupRepresentation.h"
    48 #include "HUDPickupItem.h"
    4939
    5040namespace orxonox
     
    5949        void sync(std::vector<Pickupable*> p, std::map<Pickupable*, uint32_t> indexes_);
    6050
    61         bool repaint=true; //if we shouldnt repaint, set this to false
    62 
    6351    private:
    6452       
    65         void destroyAll();
    6653        std::string getIcon(std::string repName);
    6754
    68         std::map<Pickupable*, HUDPickupItem*> picks;
    69 
     55        std::vector<HUDPickupItem*> items_;
    7056        Ogre::PanelOverlayElement* overlayElement_;
    71         WeakPtr<Pawn> owner_;
    72 
    73         std::vector<PickupRepresentation> pickupRepresentations_;
    7457    };
    7558}
Note: See TracChangeset for help on using the changeset viewer.