Version 4 (modified by dafrick, 14 years ago) (diff) |
---|
Notifications
Author
Description
Notifications are short messages, that can be sent from anywhere in Orxonox and then are displayed on the screen to inform the user about some occurence he has to know about, such as, that he just shot an killed is Archnemesis Overlord3, that he just got a PickUp or that he received a Quest and needs to have a look at the Quest-Menu.
Status
Complete, as in: Working as planned. However especially the apearance of the Notifications could still improved.
Classtree
More details
A Notification can be sent from anywhere in Orxonox just by creating an new Notification and calling sending it. It is then registered with the QuestManager and appended to any NotificationQueue present, whose targets match the (during the sending of the Notification) specified sender. The NotificationQueue creates a NotificationOverlay to display the Notification and displays it on the screen. Or a little more methodically:
Notification
The Notification class is the Notification itself, it has a message and can be sent.
NotificationManager
The NotificationManager collects all sent Notification and has a list of all NotificationQueues. The NotificationManager is the one who distributes sent notifications to the specific NotificationQueues, and keeps the lists of Notification for every NotificationQueue. So The NotificationManager basically is the one who collects, organizes an redistributes the Notifications.
NotificationQueue
The NotificationQueue creates NotificationOverlays for every Notification added (by the NotificationManager), arranges them on the screen and removes them once they have expired.
A NotificationQueue can be added in the Levelfile:
<NotificationQueue name = "SuperQueue" //Name of your OverlayQueue. maxSize = "5" //The maximum size of Notifications displayed. notificationLength = "64" //The maximum number of characters of a Notification, that are displayed. (Default is 5) displayTime = "30" //The time a Notification is displayed in seconds. (Default is 30) targets = "target1, target2" //The senders this NotificationQueue displays Notifications from. (all, if all Notifications should be displayed.) font = "VeraMono" //The font (Default is VeraMono) fontSize = '0.4' //The font size. (Default is 0.025) position = "0.0, .0.0" //The position of the NotificationQueue. (Default is 0.0,0.0) />
NotificationOverlay
The NotificationOverlay is the one actually displaying the Notifications.
Attachments (2)
- notification.png (41.0 KB) - added by dafrick 16 years ago.
-
notification2.png
(141.9 KB) -
added by dafrick 14 years ago.
Classtree of notification module
Download all attachments as: .zip