Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8522 in orxonox.OLD


Ignore:
Timestamp:
Jun 16, 2006, 11:16:01 AM (18 years ago)
Author:
bensch
Message:

tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/specials/glgui_notifier.cc

    r8518 r8522  
    2525
    2626  /**
    27    * standard constructor
     27   * @brief standard constructor
    2828   */
    2929  GLGuiNotifier::GLGuiNotifier ()
     
    5757  }
    5858
     59  /**
     60   * @brief push a message onto the notifier.
     61   * @param message the message to be pushed.
     62   *
     63   * @note it is not guaranteed, that the message is delivered instantaniously
     64   * The possibility may arise, that the DisplayLines are all in use, then one
     65   * has to wait until a line gets hidden, until a new one can be pushed to be
     66   * displayed.
     67   */
    5968  void GLGuiNotifier::pushNotifyMessage(const std::string& message)
    6069  {
    6170    if (!this->hiddenText.empty())
    6271    {
    63       printf("%s\n", message.c_str());
    64       DisplayLine dl;
     72      DisplayLine dl; // put everything in here, and then display it
     73
     74      // retrieve a Text.
    6575      dl.text = this->hiddenText.top();
    66 
     76      this->hiddenText.pop();
     77
     78      // setup Text
    6779      dl.text->setBlending(1.0f);
    6880      dl.text->setText(message);
    69       this->hiddenText.pop();
     81      dl.text->setVisibility(true);
     82      dl.text->setRelCoor2D(this->calculateLinePosition(0));
     83
    7084      dl.age = 0.0f;
    7185      this->displayLines.push_front(dl);
    72 
    73       dl.text->setVisibility(true);
    74       dl.text->setRelCoor2D(this->calculateLinePosition(0));
    7586      this->repositionText();
    7687    }
    7788    else
    7889    {
     90      // push it onto the List of messages we still need.
    7991      this->inputBuffer.push_front(message);
    80       //printf("grumble... must be fixed\n");
    81     }
    82   }
    83 
    84 
     92    }
     93  }
     94
     95
     96  /**
     97   * @brief sets the Dipsplay Line Count of the Notifier.
     98   * @param coun the count of displayLines.
     99   */
    85100  void GLGuiNotifier::setDisplayLineCount(unsigned int count)
    86101  {
     
    129144
    130145
     146  /**
     147   * @brief ticks the entire Notifier.
     148   * @param dt the time passed since the last Tick
     149   */
    131150  void GLGuiNotifier::tick(float dt)
    132151  {
Note: See TracChangeset for help on using the changeset viewer.