- Timestamp:
- Oct 14, 2009, 1:44:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2/src/orxonox/pickup/PickupInventory.cc
r5781 r5947 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()) { … … 99 123 } 100 124 125 /** 126 @brief 127 128 */ 101 129 unsigned int PickupInventory::getCurrentUsableIndex() 102 130 { … … 115 143 return 0; 116 144 } 145 117 146 bool PickupInventory::isCurrentUsable(const BaseItem* item) 118 147 { … … 123 152 return false; 124 153 } 154 125 155 void PickupInventory::selectUsable(unsigned int i) 126 156 { … … 142 172 return 0; 143 173 } 174 144 175 unsigned int PickupInventory::getUsableCount() 145 176 { … … 150 181 return 0; 151 182 } 183 152 184 unsigned int PickupInventory::getPassiveCount() 153 185 { … … 158 190 return 0; 159 191 } 192 160 193 BaseItem* PickupInventory::getEquipmentItem(unsigned int i) 161 194 { … … 170 203 return NULL; 171 204 } 205 172 206 BaseItem* PickupInventory::getUsableItem(unsigned int i) 173 207 { … … 182 216 return NULL; 183 217 } 218 184 219 BaseItem* PickupInventory::getPassiveItem(unsigned int i) 185 220 { … … 225 260 equipPane->removeChildWindow("orxonox/Inventory/Items/equ/" + id.str());*/ 226 261 } 227 for(unsigned int i = 0; i < this->visibleUsableW Indows_; i++)262 for(unsigned int i = 0; i < this->visibleUsableWindows_; i++) 228 263 { 229 264 std::ostringstream id; … … 239 274 } 240 275 } 276 241 277 void PickupInventory::updateTabs(CEGUI::WindowManager *winMgr, CEGUI::Window *equipWindow, CEGUI::Window *usableWindow) 242 278 { … … 269 305 } 270 306 } 307 271 308 void PickupInventory::updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target) 272 309 { … … 296 333 PickupInventory::setWindowProperties(winMgr, target, id.str(), item, colour); 297 334 } 298 this->visibleUsableW Indows_ = items.size();335 this->visibleUsableWindows_ = items.size(); 299 336 } 300 337 } … … 326 363 btn->setVisible(false); 327 364 } 365 328 366 void PickupInventory::setWindowProperties(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, const BaseItem* item, const std::string& textColour) 329 367 { … … 350 388 target->addChildWindow(btn); 351 389 } 390 352 391 }
Note: See TracChangeset
for help on using the changeset viewer.