Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 5 and Version 6 of code/doc/Notifications


Ignore:
Timestamp:
Sep 25, 2010, 12:33:50 AM (14 years ago)
Author:
dafrick
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/Notifications

    v5 v6  
    44[wiki:DamianFrick "Damian Frick"]
    55
    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(notification2.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.
    44 
    45 === NotificationDispatcher ===
    46 The NotificationDispatcher is an entity that upon being triggered dispatches (displays) some defined Notification. The NotificationDispatcher class is just an interface for various forms of NotificationDispatchers. The simples of which (hence the name) would be the SimpleNotification:
    47 
    48 {{{
    49 <SimpleNotification message="Awesome notification message.">
    50     <events>
    51         <trigger>
    52             <DistanceTrigger name=trigger position="0,0,100" distance=10 target="Pawn" />
    53         </trigger>
    54     </events>
    55 </SimpleNotification>
    56 }}}
     6== Documentation ==
     7The documentation is no longer present in this wiki and has been moved to the [http://www.orxonox.net/doxygen/group___notifications.html doxygen]