Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 14, 2009, 1:44:19 PM (15 years ago)
Author:
rgrieder
Message:

Merged pickup branch revisions to pickup2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup2/src/orxonox/pickup/PickupInventory.cc

    r5781 r5947  
    5252
    5353    PickupInventory* PickupInventory::pickupInventory_s = NULL;
     54
     55    //TODO: Comment.
     56
     57    /**
     58    @brief
     59        Get a Pointer to the PickupInventory Singleton.
     60    @return
     61        A Pointer to the PickupInventory.
     62    */
     63    //TODO: Make SingeltonPtr?
    5464    PickupInventory* PickupInventory::getSingleton()
    5565    {
     
    6070    }
    6171
     72    /**
     73    @brief
     74        Constructor.
     75    */
    6276    PickupInventory::PickupInventory()
    6377    {
    64         this->bInventoryVisible_ = false;
    65         this->visibleEquipmentWindows_ = this->visibleUsableWIndows_ = 0;
     78        //TODO: Maybe some abstraction for the usableWindows, e.g. push and pop...
     79        //RegisterObject() ? In some other Class, too. Which?
     80        this->bInventoryVisible_ = false; //TODO: If OrxonoxClass, this should already be there...
     81        this->visibleEquipmentWindows_ = this->visibleUsableWindows_ = 0;
    6682
    6783        // Create some windows to avoid creating them while playing
     
    7793        this->createdEquipmentWindows_ = this->createdUsableWindows_ = 10;
    7894    }
     95
     96    /**
     97    @brief
     98        Destructor.
     99    */
     100    //TODO: Destroy something?
    79101    PickupInventory::~PickupInventory()
    80102    {
    81103    }
    82104
    83 
    84 
    85     void PickupInventory::toggleInventory()
     105    /**
     106    @brief
     107        Toggles the visibility of the inventory.
     108    */
     109    /*static*/ void PickupInventory::toggleInventory()
    86110    {
    87111        if(PickupInventory::getSingleton()->isVisible()) {
     
    99123    }
    100124
     125    /**
     126    @brief
     127       
     128    */
    101129    unsigned int PickupInventory::getCurrentUsableIndex()
    102130    {
     
    115143        return 0;
    116144    }
     145
    117146    bool PickupInventory::isCurrentUsable(const BaseItem* item)
    118147    {
     
    123152            return false;
    124153    }
     154
    125155    void PickupInventory::selectUsable(unsigned int i)
    126156    {
     
    142172            return 0;
    143173    }
     174
    144175    unsigned int PickupInventory::getUsableCount()
    145176    {
     
    150181            return 0;
    151182    }
     183
    152184    unsigned int PickupInventory::getPassiveCount()
    153185    {
     
    158190            return 0;
    159191    }
     192
    160193    BaseItem* PickupInventory::getEquipmentItem(unsigned int i)
    161194    {
     
    170203            return NULL;
    171204    }
     205
    172206    BaseItem* PickupInventory::getUsableItem(unsigned int i)
    173207    {
     
    182216            return NULL;
    183217    }
     218
    184219    BaseItem* PickupInventory::getPassiveItem(unsigned int i)
    185220    {
     
    225260            equipPane->removeChildWindow("orxonox/Inventory/Items/equ/" + id.str());*/
    226261        }
    227         for(unsigned int i = 0; i < this->visibleUsableWIndows_; i++)
     262        for(unsigned int i = 0; i < this->visibleUsableWindows_; i++)
    228263        {
    229264            std::ostringstream id;
     
    239274        }
    240275    }
     276
    241277    void PickupInventory::updateTabs(CEGUI::WindowManager *winMgr, CEGUI::Window *equipWindow, CEGUI::Window *usableWindow)
    242278    {
     
    269305        }
    270306    }
     307
    271308    void PickupInventory::updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target)
    272309    {
     
    296333                PickupInventory::setWindowProperties(winMgr, target, id.str(), item, colour);
    297334            }
    298             this->visibleUsableWIndows_ = items.size();
     335            this->visibleUsableWindows_ = items.size();
    299336        }
    300337    }
     
    326363        btn->setVisible(false);
    327364    }
     365
    328366    void PickupInventory::setWindowProperties(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, const BaseItem* item, const std::string& textColour)
    329367    {
     
    350388        target->addChildWindow(btn);
    351389    }
     390
    352391}
Note: See TracChangeset for help on using the changeset viewer.