Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3363 in orxonox.OLD


Ignore:
Timestamp:
Jan 7, 2005, 12:30:14 AM (19 years ago)
Author:
patrick
Message:

orxonox/branches/parenting: extended functionality to implement progress bar

Location:
orxonox/branches/parenting/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/glmenu_imagescreen.cc

    r3362 r3363  
    171171  SDL_Delay(1000);
    172172}
    173 
    174173 
     174
    175175/**
    176176    \brief sets the background image name
     
    197197void GLMenuImageScreen::setSize(float height, float width)
    198198{}
     199
     200
     201/**
     202   \brief set the maximum of countable steps
     203   \param maximum of steps
     204*/
     205void GLMenuImageScreen::setMaximum(int maxStep)
     206{
     207  this->maxStep = maxStep;
     208}
     209
     210
     211/**
     212   \brief gets the maximum of countable steps
     213*/
     214int GLMenuImageScreen::getMaximum()
     215{
     216  return this->maxStep;
     217}
     218
     219
     220/**
     221   \brief set current value
     222   \param current value
     223*/
     224void GLMenuImageScreen::setValue(int currentValue)
     225{
     226  this->currentValue = currentValue;
     227  this->draw();
     228}
     229
     230
     231/**
     232   \brief get the current value
     233 */
     234int GLMenuImageScreen::getValue()
     235{
     236  return this->currentValue;
     237}
     238
     239
     240/**
     241    \brief call this to trigger a progress event
     242   
     243    this has to redraw the progress bar and the whole image
     244 */
     245void GLMenuImageScreen::step ()
     246{
     247  this->currentValue++;
     248}
  • orxonox/branches/parenting/src/glmenu_imagescreen.h

    r3358 r3363  
    2525 
    2626  void setBackImageName (char* backImageName);
    27   void setPosition(float offsetX, float offsetY);
    28   void setSize(float height, float width);
     27  void setPosition (float offsetX, float offsetY);
     28  void setSize (float height, float width);
     29 
     30  void setMaximum (int maxStep);
     31  int getMaximum ();
     32  void setValue (int currentValue);
     33  int getValue ();
     34  void step ();
    2935
    3036 private:
    31   char* backImageName;  //! the name of the file of the background image
    32   float height, width;
    33   float offsetX, offsetY;
    34   Texture* backTex;
    35  
     37  char* backImageName;       //! the name of the file of the background image
     38  float height, width;       //! hight and width of the image
     39  float offsetX, offsetY;    //! offset of the image from left and up
     40  Texture* backTex;          //! background texture
     41  int currentValue;          //! the current count of step() calls fired yet
     42  int maxStep;               //! total count of steps
     43
    3644};
    3745
Note: See TracChangeset for help on using the changeset viewer.