Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 25, 2009, 11:07:09 PM (14 years ago)
Author:
rgrieder
Message:

Merged pickup2 into pickup3.

Location:
code/branches/pickup3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup3

  • code/branches/pickup3/src/orxonox/pickup/PickupInventory.cc

    r6417 r6419  
    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()) {
     
    95119    }
    96120
     121    /**
     122    @brief
     123       
     124    */
    97125    unsigned int PickupInventory::getCurrentUsableIndex()
    98126    {
     
    111139        return 0;
    112140    }
     141
    113142    bool PickupInventory::isCurrentUsable(const BaseItem* item)
    114143    {
     
    119148            return false;
    120149    }
     150
    121151    void PickupInventory::selectUsable(unsigned int i)
    122152    {
     
    138168            return 0;
    139169    }
     170
    140171    unsigned int PickupInventory::getUsableCount()
    141172    {
     
    146177            return 0;
    147178    }
     179
    148180    unsigned int PickupInventory::getPassiveCount()
    149181    {
     
    154186            return 0;
    155187    }
     188
    156189    BaseItem* PickupInventory::getEquipmentItem(unsigned int i)
    157190    {
     
    166199            return NULL;
    167200    }
     201
    168202    BaseItem* PickupInventory::getUsableItem(unsigned int i)
    169203    {
     
    178212            return NULL;
    179213    }
     214
    180215    BaseItem* PickupInventory::getPassiveItem(unsigned int i)
    181216    {
     
    221256            equipPane->removeChildWindow("orxonox/Inventory/Items/equ/" + id.str());*/
    222257        }
    223         for(unsigned int i = 0; i < this->visibleUsableWIndows_; i++)
     258        for(unsigned int i = 0; i < this->visibleUsableWindows_; i++)
    224259        {
    225260            std::ostringstream id;
     
    235270        }
    236271    }
     272
    237273    void PickupInventory::updateTabs(CEGUI::WindowManager *winMgr, CEGUI::Window *equipWindow, CEGUI::Window *usableWindow)
    238274    {
     
    265301        }
    266302    }
     303
    267304    void PickupInventory::updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target)
    268305    {
     
    292329                PickupInventory::setWindowProperties(winMgr, target, id.str(), item, colour);
    293330            }
    294             this->visibleUsableWIndows_ = items.size();
     331            this->visibleUsableWindows_ = items.size();
    295332        }
    296333    }
     
    322359        btn->setVisible(false);
    323360    }
     361
    324362    void PickupInventory::setWindowProperties(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, const BaseItem* item, const std::string& textColour)
    325363    {
     
    346384        target->addChildWindow(btn);
    347385    }
     386
    348387}
Note: See TracChangeset for help on using the changeset viewer.