- Timestamp:
- Dec 25, 2009, 11:07:09 PM (14 years ago)
- Location:
- code/branches/pickup3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup3
- Property svn:mergeinfo changed
/code/branches/pickup2 (added) merged: 5942,5947,5953,6405
- Property svn:mergeinfo changed
-
code/branches/pickup3/src/orxonox/pickup/PickupInventory.cc
r6417 r6419 52 52 53 53 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? 54 64 PickupInventory* PickupInventory::getSingleton() 55 65 { … … 60 70 } 61 71 72 /** 73 @brief 74 Constructor. 75 */ 62 76 PickupInventory::PickupInventory() 63 77 { 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; 66 82 67 83 // Create some windows to avoid creating them while playing … … 77 93 this->createdEquipmentWindows_ = this->createdUsableWindows_ = 10; 78 94 } 95 96 /** 97 @brief 98 Destructor. 99 */ 100 //TODO: Destroy something? 79 101 PickupInventory::~PickupInventory() 80 102 { 81 103 } 82 104 83 84 85 void PickupInventory::toggleInventory() 105 /** 106 @brief 107 Toggles the visibility of the inventory. 108 */ 109 /*static*/ void PickupInventory::toggleInventory() 86 110 { 87 111 if(PickupInventory::getSingleton()->isVisible()) { … … 95 119 } 96 120 121 /** 122 @brief 123 124 */ 97 125 unsigned int PickupInventory::getCurrentUsableIndex() 98 126 { … … 111 139 return 0; 112 140 } 141 113 142 bool PickupInventory::isCurrentUsable(const BaseItem* item) 114 143 { … … 119 148 return false; 120 149 } 150 121 151 void PickupInventory::selectUsable(unsigned int i) 122 152 { … … 138 168 return 0; 139 169 } 170 140 171 unsigned int PickupInventory::getUsableCount() 141 172 { … … 146 177 return 0; 147 178 } 179 148 180 unsigned int PickupInventory::getPassiveCount() 149 181 { … … 154 186 return 0; 155 187 } 188 156 189 BaseItem* PickupInventory::getEquipmentItem(unsigned int i) 157 190 { … … 166 199 return NULL; 167 200 } 201 168 202 BaseItem* PickupInventory::getUsableItem(unsigned int i) 169 203 { … … 178 212 return NULL; 179 213 } 214 180 215 BaseItem* PickupInventory::getPassiveItem(unsigned int i) 181 216 { … … 221 256 equipPane->removeChildWindow("orxonox/Inventory/Items/equ/" + id.str());*/ 222 257 } 223 for(unsigned int i = 0; i < this->visibleUsableW Indows_; i++)258 for(unsigned int i = 0; i < this->visibleUsableWindows_; i++) 224 259 { 225 260 std::ostringstream id; … … 235 270 } 236 271 } 272 237 273 void PickupInventory::updateTabs(CEGUI::WindowManager *winMgr, CEGUI::Window *equipWindow, CEGUI::Window *usableWindow) 238 274 { … … 265 301 } 266 302 } 303 267 304 void PickupInventory::updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target) 268 305 { … … 292 329 PickupInventory::setWindowProperties(winMgr, target, id.str(), item, colour); 293 330 } 294 this->visibleUsableW Indows_ = items.size();331 this->visibleUsableWindows_ = items.size(); 295 332 } 296 333 } … … 322 359 btn->setVisible(false); 323 360 } 361 324 362 void PickupInventory::setWindowProperties(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, const BaseItem* item, const std::string& textColour) 325 363 { … … 346 384 target->addChildWindow(btn); 347 385 } 386 348 387 }
Note: See TracChangeset
for help on using the changeset viewer.