Changeset 513 for code/branches/FICN/src/orxonox/hud
- Timestamp:
- Dec 13, 2007, 5:58:14 PM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox/hud
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/hud/hud_overlay.cc
r337 r513 5 5 * License notice: 6 6 * 7 * This program is free software : you can redistribute it and/or modify8 * it under the terms of the GNU General Public License as published by9 * the Free Software Foundation, either version 3 of the License, or10 * (at your option) any later version.7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 11 * 12 12 * This program is distributed in the hope that it will be useful, … … 16 16 * 17 17 * You should have received a copy of the GNU General Public License 18 * along with this program . If not, see <http://www.gnu.org/licenses/>.19 * 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 20 * 21 21 * Author: … … 74 74 OverlayElement* TimeText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/Time/Text"); 75 75 TimeText->setCaption(StringConverter::toString(TimeMin) + ":" + StringConverter::toString(TimeSec)); 76 76 77 77 // set TargetWindow 78 78 String TargetWindowName = "HURRA"; … … 81 81 int TargetWindowHitRating = 30; 82 82 OverlayElement* TargetWindowNameText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/Name"); 83 TargetWindowNameText->setCaption( TargetWindowName); 83 TargetWindowNameText->setCaption( TargetWindowName); 84 84 OverlayElement* TargetWindowDistanceText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/DistanceText"); 85 85 TargetWindowDistanceText->setCaption(StringConverter::toString(TargetWindowDistance) + "km" ); … … 88 88 OverlayElement* TargetWindowHitRatingText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/HitRatingText"); 89 89 TargetWindowHitRatingText->setCaption(StringConverter::toString(TargetWindowHitRating) + "%" ); 90 90 91 91 // set Energy 92 92 int EnergyValue = 60.0; 93 93 OverlayElement* EnergyLength = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyBackground"); 94 94 EnergyLength->setWidth((int)((double)60/(double)100*200)); 95 95 96 96 // set Shild 97 97 bool ShildLeftTopValue = true; … … 111 111 if (ShildRightBottomValue) ShildRightBottom->show(); 112 112 else ShildRightBottom->hide(); 113 113 114 114 // set Rockets 115 115 int Rocket1 = 11; … … 125 125 OverlayElement* RocketNum4 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum4"); 126 126 RocketNum4->setCaption(StringConverter::toString(Rocket4)); 127 127 128 128 // set EnergyDistribution 129 129 double EnergyDistrPixelX = 100; 130 double EnergyDistrPixelY = 86; 130 double EnergyDistrPixelY = 86; 131 131 double EnergyDistrShild = 32; 132 132 double EnergyDistrEngine = 50; … … 137 137 double EnergyDistrY = (double)EnergyDistrEngineInv/((double)EnergyDistrEngineInv+(double)EnergyDistrLaserInv) * EnergyDistrPixelY; 138 138 double EnergyDistrX = EnergyDistrY/1.7321; 139 140 141 139 140 141 142 142 OverlayElement* EnergyDistrPoint = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyDistrPoint"); 143 143 // EnergyDistrPoint->setLeft(); -
code/branches/FICN/src/orxonox/hud/test_overlay.cc
r337 r513 5 5 * License notice: 6 6 * 7 * This program is free software : you can redistribute it and/or modify8 * it under the terms of the GNU General Public License as published by9 * the Free Software Foundation, either version 3 of the License, or10 * (at your option) any later version.7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 11 * 12 12 * This program is distributed in the hope that it will be useful, … … 16 16 * 17 17 * You should have received a copy of the GNU General Public License 18 * along with this program . If not, see <http://www.gnu.org/licenses/>.19 * 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 20 * 21 21 * Author:
Note: See TracChangeset
for help on using the changeset viewer.