Changeset 3041 for code/branches
- Timestamp:
- May 24, 2009, 10:01:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.cc
r3040 r3041 65 65 { 66 66 this->bInventoryVisible_ = false; 67 this->createdEquipmentWindows_ = this->createdUsableWindows_ = 0;68 67 this->visibleEquipmentWindows_ = this->visibleUsableWIndows_ = 0; 68 69 // Create some windows to avoid creating them while playing 70 CEGUI::WindowManager* winMgr = CEGUI::WindowManager::getSingletonPtr(); 71 for(int i = 0; i < 10; i++) 72 { 73 std::ostringstream id; 74 id << i; 75 76 PickupInventory::createItemWindows(winMgr, "equ/" + id.str(), i % 5, i / 5); 77 PickupInventory::createItemWindows(winMgr, "use/" + id.str(), i % 5, i / 5); 78 } 79 this->createdEquipmentWindows_ = this->createdUsableWindows_ = 10; 69 80 } 70 81 PickupInventory::~PickupInventory() … … 298 309 frame->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5 + x * 70), CEGUI::UDim(0, 5 + y * 90))); 299 310 frame->setSize(CEGUI::UVector2(CEGUI::UDim(0, 65), CEGUI::UDim(0, 65))); 311 frame->setVisible(false); 300 312 301 313 CEGUI::Window* text = winMgr->createWindow("TaharezLook/StaticText", "orxonox/Inventory/Title/" + id); … … 307 319 text->setProperty("VertFormatting", "VertCentred"); 308 320 text->setProperty("TextColours", "tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF"); 321 text->setVisible(false); 309 322 310 323 CEGUI::Window* btn = winMgr->createWindow("TaharezLook/Button", "orxonox/Inventory/Items/" + id); … … 312 325 btn->setSize(CEGUI::UVector2(CEGUI::UDim(0, 59), CEGUI::UDim(0, 59))); 313 326 btn->subscribeScriptedEvent("Clicked", "itemClicked"); 327 btn->setVisible(false); 314 328 } 315 329 void PickupInventory::setWindowProperties(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, const BaseItem* item, const std::string& textColour)
Note: See TracChangeset
for help on using the changeset viewer.