Changeset 11703 for code/trunk/src/modules/overlays
- Timestamp:
- Jan 6, 2018, 2:11:17 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc
r11702 r11703 79 79 80 80 //add to local map and place on screen 81 int i = 0;82 81 const float offsetX = 0.345f; 83 float offsetY = 0.82f;82 const float offsetY = 0.82f; 84 83 const float x = 0.102f; 84 const float y = 0.075f; 85 85 86 86 for(Pickupable* pickup:p) 87 87 { 88 i=indexes_.find(pickup)->second; 89 //second row has offset 90 if(i==5) 91 { 92 i=0; 93 offsetY+=0.075f; 94 } 88 int index = indexes_.find(pickup)->second; 89 int row = index / 5; 90 int column = index % 5; 95 91 96 92 HUDPickupItem* item = new HUDPickupItem(this->getContext()); 97 item->initializeMaterial(this->getIcon(((Pickup*)pickup)->getRepresentationName()), offsetX+ i*x, offsetY);93 item->initializeMaterial(this->getIcon(((Pickup*)pickup)->getRepresentationName()), offsetX+column*x, offsetY+row*y); 98 94 item->setOverlayGroup(this->getOverlayGroup()); 99 95 items_.push_back(item);
Note: See TracChangeset
for help on using the changeset viewer.