Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Text coloring in notification queue now working.

Location:
code/branches/tutoriallevel2/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutoriallevel2/src/modules/notifications/NotificationDispatcher.cc

    r8374 r8377  
    113113        {
    114114            const std::string message = this->createNotificationMessage();
    115             NotificationListener::sendNotification(message, clientId, this->getSender());
     115            NotificationListener::sendNotification(message, this->getSender(), notificationMessageMode::message, notificationSendMode::network, clientId);
    116116        }
    117117        else if(GameMode::isServer())
  • code/branches/tutoriallevel2/src/modules/questsystem/QuestDescription.cc

    r8374 r8377  
    119119        }
    120120
    121         NotificationListener::sendNotification(message, player->getClientID(), QuestDescription::SENDER);
     121        NotificationListener::sendNotification(message, QuestDescription::SENDER, notificationMessageMode::message, notificationSendMode::network, player->getClientID());
    122122        return true;
    123123    }
  • code/branches/tutoriallevel2/src/orxonox/interfaces/NotificationListener.h

    r8374 r8377  
    4848namespace orxonox
    4949{
    50     class Notification;
     50   
     51    namespace notificationMessageMode
     52    {
     53        enum Value {
     54            message,
     55            command
     56        };
     57    }
     58   
     59    namespace notificationSendMode
     60    {
     61        enum Value {
     62            local,
     63            network,
     64            broadcast
     65        };
     66    }
    5167
    5268    /**
     
    7187            static const std::string NONE; //!< Static string to indicare a sender that sends to no specific NotificationListener.
    7288           
    73             static void sendNotification(const std::string& message, unsigned int clientId, const std::string& sender = NotificationListener::NONE, bool isLocal = false);
     89            static void sendNotification(const std::string& message, const std::string& sender = NotificationListener::NONE, notificationMessageMode::Value messageMode = notificationMessageMode::message, notificationSendMode::Value sendMode = notificationSendMode::local, unsigned int clientId = 0);
     90            static void sendNotificationHelper(const std::string& message, const std::string& sender, unsigned int messageMode);
    7491           
    7592            virtual bool registerNotification(const std::string& message, const std::string& sender)
    7693                { return false; }
     94            virtual void executeCommand(const std::string& command, const std::string& sender) {}
    7795    };
    7896}
Note: See TracChangeset for help on using the changeset viewer.