| 1 | = Notifications = |
| 2 | |
| 3 | == Author == |
| 4 | [wiki:DamianFrick "Damian Frick"] |
| 5 | |
| 6 | == Description == |
| 7 | 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. |
| 8 | |
| 9 | == Status == |
| 10 | Complete, as in: Working as planned. However especially the apearance of the Notifications could still improved. |
| 11 | |
| 12 | == Classtree == |
| 13 | [[Image(notfications.png)]] |
| 14 | |
| 15 | == More details == |
| 16 | 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. |
| 17 | Or a little more methodically: |
| 18 | |
| 19 | === Notification === |
| 20 | The Notification class is the Notification itself, it has a message and can be sent. |
| 21 | |
| 22 | === NotificationManager === |
| 23 | 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. |
| 24 | |
| 25 | === NotificationQueue === |
| 26 | The NotificationQueue creates NotificationOverlays for every Notification added (by the NotificationManager), arranges them on the screen and removes them once they have expired. |
| 27 | |
| 28 | A NotificationQueue can be added in the Levelfile: |
| 29 | {{{ |
| 30 | <NotificationQueue |
| 31 | name = "SuperQueue" //Name of your OverlayQueue. |
| 32 | maxSize = "5" //The maximum size of Notifications displayed. |
| 33 | notificationLength = "64" //The maximum number of characters of a Notification, that are displayed. (Default is 5) |
| 34 | displayTime = "30" //The time a Notification is displayed in seconds. (Default is 30) |
| 35 | targets = "target1, target2" //The senders this NotificationQueue displays Notifications from. (all, if all Notifications should be displayed.) |
| 36 | font = "VeraMono" //The font (Default is VeraMono) |
| 37 | fontSize = '0.4' //The font size. (Default is 0.025) |
| 38 | position = "0.0, .0.0" //The position of the NotificationQueue. (Default is 0.0,0.0) |
| 39 | /> |
| 40 | }}} |
| 41 | |
| 42 | === NotificationOverlay === |
| 43 | The NotificationOverlay is the one actually displaying the Notifications. |