Changeset 4241 in orxonox.OLD for orxonox/branches/levelLoader/src/glmenu
- Timestamp:
- May 20, 2005, 3:45:55 AM (20 years ago)
- Location:
- orxonox/branches/levelLoader/src/glmenu
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelLoader/src/glmenu/glmenu_imagescreen.cc
r4239 r4241 60 60 const char* string; 61 61 62 // Model Loading 63 string = grabParameter( root, "BackgroundImage"); 64 if( string != NULL) 65 this->setBackgroundImage(string); 66 67 string = grabParameter(root, "BackgroundPS"); 68 if (string != NULL) 69 { 70 float f1, f2, f3, f4; 71 sscanf (string, "%f %f %f %f", &f1, &f2, &f3, &f4); 72 this->setPosition(f1,f2); 73 this->setScale(f3,f4); 74 } 75 76 string = grabParameter( root, "BarImage"); 77 if (string != NULL) 78 this->setBarImage(string); 79 string = grabParameter(root, "BarPS"); 80 if (string != NULL) 81 { 82 float f1, f2, f3, f4; 83 sscanf (string, "%f %f %f %f", &f1, &f2, &f3, &f4); 84 this->setBarPosScale(f1,f2,f3,f4); 85 } 86 87 string = grabParameter( root, "ElementCount"); 88 if (string != NULL) 89 this->setMaximum(atoi(string)); 62 LoadParam<GLMenuImageScreen>(root, "BackgroundImage", this, &GLMenuImageScreen::setBackgroundImage); 63 64 LoadParam<GLMenuImageScreen>(root, "BackgroundPS", this, &GLMenuImageScreen::setPosScale); 65 66 LoadParam<GLMenuImageScreen>(root, "BarImage", this, &GLMenuImageScreen::setBarImage); 67 68 LoadParam<GLMenuImageScreen>(root, "BarPS", this, &GLMenuImageScreen::setBarPosScale); 69 70 LoadParam<GLMenuImageScreen>(root, "ElementCount", this, &GLMenuImageScreen::setMaximum); 90 71 } 91 72 … … 149 130 this->scaleX = scaleX; 150 131 this->scaleY = scaleY; 132 } 133 134 /* 135 \brief sets position and size of the ImageScreen 136 \param x offset from the top left corner in percent(0-1) of the screensize 137 \param y offset from the top left corner in percent(0-1) of the screensize 138 \param scaleX the scaleing of the image into the x-direction (in percent (0-1)) 139 \param scaleY the scaleing of the image into the y-direction (in percent (0-1)) 140 */ 141 void GLMenuImageScreen::setPosScale(float offsetX, float offsetY, float scaleX, float scaleY) 142 { 143 this->setPosition(offsetX, offsetY); 144 this->setScale(scaleX, scaleY); 151 145 } 152 146 -
orxonox/branches/levelLoader/src/glmenu/glmenu_imagescreen.h
r4104 r4241 28 28 void setPosition(float offsetX, float offsetY); 29 29 void setScale (float scaleX, float scaleY); 30 void setPosScale(float offsetX, float offsetY, float scaleX, float scaleY); 30 31 31 32 void setBarImage(const char* barImage);
Note: See TracChangeset
for help on using the changeset viewer.