Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 1, 2011, 2:43:33 PM (14 years ago)
Author:
dafrick
Message:

Merging tutoriallevel branch into tutoriallevel2 branch.

Location:
code/branches/tutoriallevel2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutoriallevel2

  • code/branches/tutoriallevel2/src/modules/notifications/NotificationQueue.cc

    r8079 r8371  
    161161    {
    162162        this->tickTime_ += dt; // Add the time interval that has passed to the time counter.
    163         if(this->tickTime_ >= 1.0) // If the time counter is greater than 1s all Notifications that have expired are removed, if it is smaller we wait to the next tick.
     163        if(this->displayTime_ != INF && this->tickTime_ >= 1.0) // If the time counter is greater than 1s all Notifications that have expired are removed, if it is smaller we wait to the next tick.
    164164        {
    165165            this->timeLimit_.time = std::time(0)-this->displayTime_; // Container containig the current time.
     
    188188        std::multimap<std::time_t, Notification*>* notifications = new std::multimap<std::time_t, Notification*>;
    189189        // Get the Notifications sent in the interval from now to now minus the display time.
    190         NotificationManager::getInstance().getNotifications(this, notifications, this->displayTime_);
     190        if(this->displayTime_ == INF)
     191            NotificationManager::getInstance().getNewestNotifications(this, notifications, this->getMaxSize());
     192        else
     193            NotificationManager::getInstance().getNotifications(this, notifications, this->displayTime_);
    191194
    192195        if(!notifications->empty())
     
    364367        Sets the maximum number of seconds a Notification is displayed.
    365368    @param time
    366         The number of seconds the Notifications is displayed.
    367     @return
    368         Returns true if successful.
    369     */
    370     void NotificationQueue::setDisplayTime(unsigned int time)
     369        The number of seconds a Notification is displayed.
     370    */
     371    void NotificationQueue::setDisplayTime(int time)
    371372    {
    372373        if(this->displayTime_ == time)
Note: See TracChangeset for help on using the changeset viewer.