Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 21, 2010, 11:15:44 PM (14 years ago)
Author:
dafrick
Message:

Synchronizing Notifications.
In the course of that, notifications are not longer sent by creating a Notification and the calling notification.send() bur by letting the NotificationManager handle all this: NotificationManager::getInstance().sendNotification(message)
This made QuestNotification obsolete, thus it was removde.

Also did some work on synchronizing the Script class. It should work properly most of the time, but the current solution is unreliable and unsatisfactory. So this will change as soon as I know how.

Location:
code/trunk/src/modules/notifications/dispatchers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/notifications/dispatchers/CommandNotification.cc

    r7456 r7474  
    5555
    5656        this->setSender("commandNotification");
     57        this->registerVariables();
    5758    }
    5859
     
    7778        XMLPortParam(CommandNotification, "preMessage", setPreMessage, getPreMessage, xmlelement, mode);
    7879        XMLPortParam(CommandNotification, "postMessage", setPostMessage, getPostMessage, xmlelement, mode);
     80    }
     81
     82    void CommandNotification::registerVariables(void)
     83    {
     84        registerVariable(this->command_, VariableDirection::ToClient);
     85        registerVariable(this->preMessage_, VariableDirection::ToClient);
     86        registerVariable(this->postMessage_, VariableDirection::ToClient);
    7987    }
    8088
  • code/trunk/src/modules/notifications/dispatchers/CommandNotification.h

    r7456 r7474  
    3838#include "notifications/NotificationsPrereqs.h"
    3939
     40#include <string>
    4041#include "notifications/NotificationDispatcher.h"
    41 #include <string>
    4242
    4343namespace orxonox {
     
    8686            std::string postMessage_; //!< The last part of the displayed message.
    8787
     88            void registerVariables(void);
     89
    8890            /**
    8991            @brief Set the command, whose key is displayed.
  • code/trunk/src/modules/notifications/dispatchers/SimpleNotification.cc

    r7456 r7474  
    5050
    5151        this->setSender("simpleNotification");
     52
     53        this->setSyncMode(0x0);
    5254    }
    5355
Note: See TracChangeset for help on using the changeset viewer.