[Orxonox-commit 6718] r11347 - in code/branches/Presentation_HS16: . data/levels data/overlays src/modules/notifications src/modules/notifications/dispatchers src/modules/overlays/hud

maxima at orxonox.net maxima at orxonox.net
Mon Dec 19 08:15:56 CET 2016


Author: maxima
Date: 2016-12-19 08:15:56 +0100 (Mon, 19 Dec 2016)
New Revision: 11347

Added:
   code/branches/Presentation_HS16/src/modules/notifications/dispatchers/Dialogue.cc
   code/branches/Presentation_HS16/src/modules/notifications/dispatchers/Dialogue.h
   code/branches/Presentation_HS16/src/modules/notifications/dispatchers/DialogueManager.cc
   code/branches/Presentation_HS16/src/modules/notifications/dispatchers/DialogueManager.h
   code/branches/Presentation_HS16/src/modules/overlays/hud/HUDDialogue.cc
   code/branches/Presentation_HS16/src/modules/overlays/hud/HUDDialogue.h
Modified:
   code/branches/Presentation_HS16/
   code/branches/Presentation_HS16/data/levels/missionOne.oxw
   code/branches/Presentation_HS16/data/overlays/HUDTemplates3.oxo
   code/branches/Presentation_HS16/src/modules/notifications/CMakeLists.txt
   code/branches/Presentation_HS16/src/modules/notifications/NotificationDispatcher.h
   code/branches/Presentation_HS16/src/modules/notifications/NotificationManager.h
   code/branches/Presentation_HS16/src/modules/notifications/dispatchers/CMakeLists.txt
   code/branches/Presentation_HS16/src/modules/overlays/hud/CMakeLists.txt
Log:
dialog branch merged to presentation


Property changes on: code/branches/Presentation_HS16
___________________________________________________________________
Modified: svn:mergeinfo
   - /code/branches/AI_HS15:10640-10832
/code/branches/BigShip_HS16:11213-11343
/code/branches/Highscore_HS16:11226-11338
/code/branches/ParticleEffectsFS15:10309-10612
/code/branches/Racingbot:9388-9513
/code/branches/SciptableControllerFS15:10308-10613
/code/branches/ScriptableController:9999-10075
/code/branches/SpaceRace_HS16:11214-11341
/code/branches/StoryModeMap_HS16:11221-11340
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/campaignHS15:10639-10973
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/clangenb:10385-10609
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/core6:9552-9666
/code/branches/core7:10328-10623
/code/branches/cpp11:10439-10732
/code/branches/cpp11_v2:10732-11067
/code/branches/cpp11_v3:11053-11070
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/explosionChunksHS15:10641-10961
/code/branches/fabienHS15:10685-11033
/code/branches/formation:8885-8991
/code/branches/formationFS15:10320-10610
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hoverHS15:10633-10959
/code/branches/hud:8883-8986
/code/branches/hudHS14:10083-10241
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/keckslevelHS14:10082-10222
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/code/branches/multiplayerFS15:10324-10611
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/newlevel2012:9033-9244
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/code/branches/particleEffectsHS15:10644-10962
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/pickupsFS14:10000-10259
/code/branches/planetLevelHS15:10637-10966
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationFS14:10069-10215
/code/branches/presentationFS15:10499
/code/branches/presentationFS15merge:10595-10621
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/code/branches/presentationHS15:10959-11055
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/sfxThilo:9691-9917
/code/branches/shaders:9379-11072
/code/branches/shaders_merge:11072-11079
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/soundEffects:9382-11020
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/spacestationentry:9699-9905
/code/branches/steering:5949-6091,8140-8595
/code/branches/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseFS15:10283-10614
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weaponFS15:10302-10615
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
/code/branches/weaponupdateHS14:10084-10237
/code/trunk:11212-11225
   + /code/branches/AI_HS15:10640-10832
/code/branches/BigShip_HS16:11213-11343
/code/branches/Dialog_HS16:11231-11345
/code/branches/Highscore_HS16:11226-11338
/code/branches/ParticleEffectsFS15:10309-10612
/code/branches/Racingbot:9388-9513
/code/branches/SciptableControllerFS15:10308-10613
/code/branches/ScriptableController:9999-10075
/code/branches/SpaceRace_HS16:11214-11341
/code/branches/StoryModeMap_HS16:11221-11340
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/campaignHS15:10639-10973
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/clangenb:10385-10609
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/core6:9552-9666
/code/branches/core7:10328-10623
/code/branches/cpp11:10439-10732
/code/branches/cpp11_v2:10732-11067
/code/branches/cpp11_v3:11053-11070
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/explosionChunksHS15:10641-10961
/code/branches/fabienHS15:10685-11033
/code/branches/formation:8885-8991
/code/branches/formationFS15:10320-10610
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hoverHS15:10633-10959
/code/branches/hud:8883-8986
/code/branches/hudHS14:10083-10241
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/keckslevelHS14:10082-10222
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/code/branches/multiplayerFS15:10324-10611
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/newlevel2012:9033-9244
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/code/branches/particleEffectsHS15:10644-10962
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/pickupsFS14:10000-10259
/code/branches/planetLevelHS15:10637-10966
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationFS14:10069-10215
/code/branches/presentationFS15:10499
/code/branches/presentationFS15merge:10595-10621
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/code/branches/presentationHS15:10959-11055
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/sfxThilo:9691-9917
/code/branches/shaders:9379-11072
/code/branches/shaders_merge:11072-11079
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/soundEffects:9382-11020
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/spacestationentry:9699-9905
/code/branches/steering:5949-6091,8140-8595
/code/branches/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseFS15:10283-10614
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weaponFS15:10302-10615
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
/code/branches/weaponupdateHS14:10084-10237
/code/trunk:11212-11230

Modified: code/branches/Presentation_HS16/data/levels/missionOne.oxw
===================================================================
--- code/branches/Presentation_HS16/data/levels/missionOne.oxw	2016-12-19 07:12:17 UTC (rev 11346)
+++ code/branches/Presentation_HS16/data/levels/missionOne.oxw	2016-12-19 07:15:56 UTC (rev 11347)
@@ -30,15 +30,16 @@
 
   <NotificationQueueCEGUI
     name="narrative"
-    targets="simpleNotification"
+    targets="simpleNotification,dialogue"
     size=3
     displayTime=3.9
     position="0.2, 0, 0.1, 0"
-    fontSize="23"
+    fontSize="19"
     fontColor="0.3, 1, 0.2, 0.8"
     alignment="HorzCentred"
     displaySize="0.6, 0, 0, 0"
     />
+
   <Scene
     ambientlight = "0.8, 0.8, 0.8"
     skybox       = "Orxonox/Starbox"
@@ -369,13 +370,13 @@
 
 
     <DistanceTrigger name="spawndelaytrigger0" position="800,700,600" target="Pawn" distance=10 stayActive="true" delay=2/>
-    <SimpleNotification message="Press (F3) to see your mission briefing.">
+    <Dialogue speaker="Speaker" message=" Press (F3) to see your mission briefing." portrait="Orxonox/DialogueHUD_Person">
         <events>
             <trigger>
                 <EventListener event="spawndelaytrigger0" />
             </trigger>
         </events>
-    </SimpleNotification>
+    </Dialogue>
 
 <!-- Blinking Billboard should be replaced with WAYPOINT -->
 <BlinkingBillboard position="-900,640,600" frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,1,0.05">
@@ -408,22 +409,22 @@
 <!-------------------------------------- PART ZERO: How to fly --------------------------------------->
 
     <DistanceTrigger name="flying1" position="800,700,600" target="Pawn" distance=10 stayActive="true" delay=6/>
-    <SimpleNotification message="Let's fly to the blinking light.">
+    <Dialogue speaker="Speaker" message="Let's fly to the blinking light." portrait="Orxonox/DialogueHUD_Person">
         <events>
             <trigger>
                 <EventListener event="flying1" />
             </trigger>
         </events>
-    </SimpleNotification>
+    </Dialogue>
 
     <DistanceTrigger name="flying2" position="800,700,600" target="Pawn" distance=10 stayActive="true" delay=10/>
-    <SimpleNotification message="Use (W) to accelerate and the mouse to steer.">
+    <Dialogue speaker="Speaker" message="Use (W) to accelerate and the mouse to steer." portrait="Orxonox/DialogueHUD_Person">
         <events>
             <trigger>
                 <EventListener event="flying2" />
             </trigger>
         </events>
-    </SimpleNotification>
+    </Dialogue>
 
 <!-- QUEST-Trigger && Message Trigger: navigationend is activated after flying4 was triggered -->
     <DistanceTrigger name="navigationend" position="0,0,0" distance=950 target="SpaceShip" stayActive="false" delay=1.1>
@@ -431,22 +432,22 @@
     </DistanceTrigger>
 
 
-    <SimpleNotification message="Three arrows just appeared.">
+    <Dialogue speaker="Speaker2" message="Three arrows just appeared." portrait="Orxonox/DialogueHUD_Person2">
         <events>
             <trigger>
                 <EventListener event="flying4" />
             </trigger>
         </events>
-    </SimpleNotification>
+    </Dialogue>
 
     <DistanceTrigger name="flying5" position="-900,640,600" target="Pawn" distance=60 stayActive="true" delay=5/>
-    <SimpleNotification message="Follow those arrows.">
+    <Dialogue speaker="Speaker2" message="Follow those arrows." portrait="Orxonox/DialogueHUD_Person2">
         <events>
             <trigger>
                 <EventListener event="flying5" />
             </trigger>
         </events>
-    </SimpleNotification>
+    </Dialogue>
 
 <!-------------------------------------- PART ONE : Destroy boxes --------------------------------------->
 <!-- @ triggers: spawndelaytriggerX: textoutput only if no box was destroyed -->
@@ -484,15 +485,15 @@
     </Trigger>
 
 <!-- @Text: How to shoot-->
-    <SimpleNotification message="Destroy the four boxes." broadcast="true">
+    <Dialogue speaker="Speaker" message="Destroy the four boxes." portrait="Orxonox/DialogueHUD_Person" broadcast="true">
         <events>
             <trigger>
                 <EventListener event="spawndelaytrigger1" />
             </trigger>
         </events>
-    </SimpleNotification>
+    </Dialogue>
 
-    <SimpleNotification message=" 1. Aim the a red cycle." broadcast="true">
+    <SimpleNotification message=" 1. Aim at the red cycle." broadcast="true">
         <events>
             <trigger>
                 <EventListener event="spawndelaytrigger2" />

Modified: code/branches/Presentation_HS16/data/overlays/HUDTemplates3.oxo
===================================================================
--- code/branches/Presentation_HS16/data/overlays/HUDTemplates3.oxo	2016-12-19 07:12:17 UTC (rev 11346)
+++ code/branches/Presentation_HS16/data/overlays/HUDTemplates3.oxo	2016-12-19 07:15:56 UTC (rev 11347)
@@ -183,6 +183,18 @@
      visible                = "true"
      weaponModeHUDSize      = "0.09, 0.03"
     />
+
+    <HUDDialogue
+     name     = "Dialogue"
+     position = "0.5, 0.85"
+     pickpoint = "0.5, 0.5"
+     font     = "VeraMono"
+     size = "0.2, 0.2"
+     textsize = 0.1
+     colour   = "1.0, 1.0, 0.0, 0.8"
+     align    = "center"
+    />
+
     
     <HUDPickupSystem
      name                   = "PickupSystem"

Modified: code/branches/Presentation_HS16/src/modules/notifications/CMakeLists.txt
===================================================================
--- code/branches/Presentation_HS16/src/modules/notifications/CMakeLists.txt	2016-12-19 07:12:17 UTC (rev 11346)
+++ code/branches/Presentation_HS16/src/modules/notifications/CMakeLists.txt	2016-12-19 07:15:56 UTC (rev 11347)
@@ -16,6 +16,7 @@
   PCH_FILE
     NotificationsPrecompiledHeaders.h
   LINK_LIBRARIES
+    overlays
     orxonox
   SOURCE_FILES ${NOTIFICATIONS_SRC_FILES}
 )

Modified: code/branches/Presentation_HS16/src/modules/notifications/NotificationDispatcher.h
===================================================================
--- code/branches/Presentation_HS16/src/modules/notifications/NotificationDispatcher.h	2016-12-19 07:12:17 UTC (rev 11346)
+++ code/branches/Presentation_HS16/src/modules/notifications/NotificationDispatcher.h	2016-12-19 07:15:56 UTC (rev 11347)
@@ -125,6 +125,7 @@
             */
             virtual const std::string& createNotificationMessage(void)
                 { return BLANKSTRING; }
+            
 
     };
 

Modified: code/branches/Presentation_HS16/src/modules/notifications/NotificationManager.h
===================================================================
--- code/branches/Presentation_HS16/src/modules/notifications/NotificationManager.h	2016-12-19 07:12:17 UTC (rev 11346)
+++ code/branches/Presentation_HS16/src/modules/notifications/NotificationManager.h	2016-12-19 07:15:56 UTC (rev 11347)
@@ -76,7 +76,6 @@
             */
             inline const std::string & getMessage(void) const
                 { return this->message_; }
-
             /**
             @brief Get the sender of the Notification.
             @return Returns the sender of the Notification.
@@ -93,7 +92,7 @@
 
         private:
             std::string message_; //!< The Notification message.
-            std::string sender_; //!< The sender of the notification.
+            std::string sender_;//!< The sender of the notifications.
             NotificationMessageType type_; //!< The type of the notification.
 
             void initialize(void); //!< Registers the object and sets some default values.

Modified: code/branches/Presentation_HS16/src/modules/notifications/dispatchers/CMakeLists.txt
===================================================================
--- code/branches/Presentation_HS16/src/modules/notifications/dispatchers/CMakeLists.txt	2016-12-19 07:12:17 UTC (rev 11346)
+++ code/branches/Presentation_HS16/src/modules/notifications/dispatchers/CMakeLists.txt	2016-12-19 07:15:56 UTC (rev 11347)
@@ -1,4 +1,5 @@
 ADD_SOURCE_FILES(NOTIFICATIONS_SRC_FILES
   CommandNotification.cc
   SimpleNotification.cc
+  Dialogue.cc
 )

Copied: code/branches/Presentation_HS16/src/modules/notifications/dispatchers/Dialogue.cc (from rev 11345, code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc)
===================================================================
--- code/branches/Presentation_HS16/src/modules/notifications/dispatchers/Dialogue.cc	                        (rev 0)
+++ code/branches/Presentation_HS16/src/modules/notifications/dispatchers/Dialogue.cc	2016-12-19 07:15:56 UTC (rev 11347)
@@ -0,0 +1,66 @@
+
+#include "Dialogue.h"
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+#include "core/XMLPort.h"
+
+#include "overlays/hud/HUDDialogue.h"
+
+#include "NotificationDispatcher.h"
+
+namespace orxonox{
+	
+	RegisterClass(Dialogue);
+
+    /**
+    @brief
+        Default Constructor. Registers the object and initializes variables.
+    */
+	Dialogue::Dialogue(Context* context):NotificationDispatcher(context){
+		RegisterObject(Dialogue);
+
+		this->setSender("dialogue");
+
+        this->setSyncMode(ObjectDirection::None);
+	}
+    /**
+    @brief
+        Destructor.
+    */
+	Dialogue::~Dialogue()
+    {
+
+    }
+    /**
+    @brief
+        Method for creating a Dialogue object through XML.
+    */
+    void Dialogue::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Dialogue, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Dialogue, "speaker", setSpeaker, getSpeaker, xmlelement, mode);
+        XMLPortParam(Dialogue, "message", setMessage, getMessage, xmlelement, mode);
+        XMLPortParam(Dialogue, "portrait", setPortrait, getPortrait, xmlelement, mode);
+        
+    }
+    /**
+    @brief
+        Passes the name of the picture over to the HUDDialogue class
+    */
+    void Dialogue::update()
+    {    
+       for(HUDDialogue* huddialogue : ObjectList<HUDDialogue>())
+                       huddialogue->updateTarget(portrait_);
+    }
+    /**
+        @brief Creates the notification message,Pconsisting of a speaker and a message, that should be sent upon the Dialgue triggering.
+        @return Returns the notification message.
+    */
+    const std::string& Dialogue::createNotificationMessage(void)
+                { 	
+                	dialogue_ = speaker_ + ": " + message_;
+                    this->update();
+                	return this->dialogue_ ;
+                }
+}
\ No newline at end of file

Copied: code/branches/Presentation_HS16/src/modules/notifications/dispatchers/Dialogue.h (from rev 11345, code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h)
===================================================================
--- code/branches/Presentation_HS16/src/modules/notifications/dispatchers/Dialogue.h	                        (rev 0)
+++ code/branches/Presentation_HS16/src/modules/notifications/dispatchers/Dialogue.h	2016-12-19 07:15:56 UTC (rev 11347)
@@ -0,0 +1,96 @@
+
+#ifndef _Dialogue_H__
+#define _Dialogue_H__
+#include <string>	
+//#include "core/BaseObject.h"
+
+#include "notifications/NotificationsPrereqs.h"
+
+#include "notifications/NotificationDispatcher.h"
+
+namespace orxonox{
+
+	/**
+    @brief
+        The Dialogue class enables the sending of (in XML) predefined Notifications upon some kind of triggering event.
+
+        In use it would like this:
+        @code
+        <Dialogue message="some message..." speaker="speaker" portrait="Orxonox/some_file">
+            <events>
+                <trigger>
+                    <PlayerTrigger />
+                </trigger>
+            </events>
+        </Dialogue>
+        @endcode
+        For more information on what can be used for @code <PlayerTrigger /> @endcode see the @ref orxonox::NotificationDispatcher "NotificationDispatcher" documentation.
+		For more information about the Dialogue class take a look at the Notifications entry in the wiki.
+		*/
+
+class _NotificationsExport Dialogue: public NotificationDispatcher{
+
+	public:
+            Dialogue(Context* context); //!< Default Constructor.
+            virtual ~Dialogue(); //!< Destructor.
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Dialogue object through XML.
+
+            /**
+            @brief Get the message, that is displayed.
+            @return Returns the message, that is displayed.
+            */
+            const std::string& getMessage(void)
+                	{ return this->message_; }
+            /**
+            @brief Get the name of the speaker.
+            @return Returns the name of the speaker.
+            */
+         	const std::string& getSpeaker(void)
+            		{return this->speaker_;}
+            /**
+            @brief Get the name of the file of the picture
+            @return Returns the name of the file.
+            */
+            const std::string& getPortrait(void)
+            		{ return this->portrait_;}
+
+    protected:
+    	/**
+            @brief Creates the notification message that should be sent upon the Dialgue triggering.
+            @return Returns the notification message.
+            */
+    	virtual const std::string& createNotificationMessage(void);
+    	/**
+    		@brief Updates the picture that is displayed by passing the name of the picture over to the HUDDialogue class.
+    		*/
+        virtual void update(void);
+       	
+    private:
+    		std::string message_; //!< The message.
+    		std::string speaker_; //!< The name of the speaker.
+    		std::string dialogue_; //!< The speaker and the message that is displayed.
+    		std::string portrait_; //!< The name of the file.
+
+    		/**
+    		@brief Sets the name of the speaker.
+    		@param speaker The name of the speaker.
+    		*/
+    		void setSpeaker(const std::string& speaker)
+            	{ this->speaker_ = speaker;}
+            /**
+            @brief Sets the message that is to be displayed.
+            @param message The message to be displayed.
+            */
+    		void setMessage(const std::string& message)
+                { this->message_ = message; }
+            /**
+            @brief Sets the name of the file of the picture.
+            @param portrait Name of the file which is used.
+            */
+            void setPortrait(const std::string& portrait)
+            	{ this->portrait_ = portrait;}
+        } ;       
+}
+
+#endif 
\ No newline at end of file

Copied: code/branches/Presentation_HS16/src/modules/notifications/dispatchers/DialogueManager.cc (from rev 11345, code/branches/Dialog_HS16/src/modules/notifications/dispatchers/DialogueManager.cc)
===================================================================
--- code/branches/Presentation_HS16/src/modules/notifications/dispatchers/DialogueManager.cc	                        (rev 0)
+++ code/branches/Presentation_HS16/src/modules/notifications/dispatchers/DialogueManager.cc	2016-12-19 07:15:56 UTC (rev 11347)
@@ -0,0 +1,29 @@
+
+
+#include "DialogueManager.h"
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+#include "core/XMLPort.h"
+
+
+
+
+namespace orxonox{
+
+
+	RegisterClass(DialogueManager);
+
+	DialogueManager::DialogueManager(Context* context):NotificationDispatcher(context)
+	{
+		RegisterObject(DialogueManager);
+
+	}
+	DialogueManager::~DialogueManager()
+    {
+
+    }
+    void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(DialogueManager, XMLPort, xmlelement, mode);
+    }
+}
\ No newline at end of file

Copied: code/branches/Presentation_HS16/src/modules/notifications/dispatchers/DialogueManager.h (from rev 11345, code/branches/Dialog_HS16/src/modules/notifications/dispatchers/DialogueManager.h)
===================================================================
--- code/branches/Presentation_HS16/src/modules/notifications/dispatchers/DialogueManager.h	                        (rev 0)
+++ code/branches/Presentation_HS16/src/modules/notifications/dispatchers/DialogueManager.h	2016-12-19 07:15:56 UTC (rev 11347)
@@ -0,0 +1,24 @@
+
+
+#ifndef _DialogueManager_H__
+#define _DialogueManager_H__
+
+#include "notifications/NotificationsPrereqs.h"
+
+#include "notifications/NotificationDispatcher.h"
+
+namespace orxonox{
+
+
+	class _NotificationsExport DialogueManager: public NotificationDispatcher{
+
+	public:
+            DialogueManager(Context* context); //!< Default Constructor.
+            virtual ~DialogueManager(); //!< Destructor.
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+        };
+}
+
+#endif 
\ No newline at end of file

Modified: code/branches/Presentation_HS16/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/branches/Presentation_HS16/src/modules/overlays/hud/CMakeLists.txt	2016-12-19 07:12:17 UTC (rev 11346)
+++ code/branches/Presentation_HS16/src/modules/overlays/hud/CMakeLists.txt	2016-12-19 07:15:56 UTC (rev 11347)
@@ -26,4 +26,5 @@
   PauseNotice.cc
   LastTeamStandingInfos.cc
   CountDown.cc
+  HUDDialogue.cc
 )

Copied: code/branches/Presentation_HS16/src/modules/overlays/hud/HUDDialogue.cc (from rev 11345, code/branches/Dialog_HS16/src/modules/overlays/hud/HUDDialogue.cc)
===================================================================
--- code/branches/Presentation_HS16/src/modules/overlays/hud/HUDDialogue.cc	                        (rev 0)
+++ code/branches/Presentation_HS16/src/modules/overlays/hud/HUDDialogue.cc	2016-12-19 07:15:56 UTC (rev 11347)
@@ -0,0 +1,60 @@
+
+
+#include "HUDDialogue.h"
+
+#include "core/XMLPort.h"
+
+#include <OgreCamera.h>
+#include <OgreFontManager.h>
+#include <OgreOverlayManager.h>
+#include <OgreTextAreaOverlayElement.h>
+#include <OgrePanelOverlayElement.h>
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+
+	RegisterClass (HUDDialogue);
+	/**
+    @brief
+        Default Constructor. Registers the object and initializes variables.
+    */
+	HUDDialogue::HUDDialogue(Context* context) :
+    OrxonoxOverlay(context)
+    {
+        RegisterObject(HUDDialogue);
+	}   
+	/**
+	@brief
+		Updates the picture to the picture which was declared in the Dialogue class and sets a timer to set the picture on invisible again.
+	*/  
+    void HUDDialogue::updateTarget(std::string portrait)
+    {
+    	overlayElementIcon_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "Dialogue" + getUniqueNumberString()));
+        overlayElementIcon_->setPosition(0.0f,0.0f);
+        overlayElementIcon_->setDimensions(1.0f,1.0f);
+        this->background_->addChild(overlayElementIcon_);     
+
+    	overlayElementIcon_->setMaterialName(portrait);
+    	this->setVisible(true);
+    	portraitTimer.setTimer(2.9f,false,createExecutor(createFunctor(&HUDDialogue::invisible, this)));
+    }
+    /**
+    @brief
+    	Sets the picture back to invisible again.
+    */
+    void HUDDialogue::invisible()
+    {
+    	this->setVisible(false);
+    	Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->overlayElementIcon_);
+    }
+    /**
+    @brief
+    	Default Destructor.
+    */
+	HUDDialogue::~HUDDialogue()
+	{
+
+
+	}
+}
\ No newline at end of file

Copied: code/branches/Presentation_HS16/src/modules/overlays/hud/HUDDialogue.h (from rev 11345, code/branches/Dialog_HS16/src/modules/overlays/hud/HUDDialogue.h)
===================================================================
--- code/branches/Presentation_HS16/src/modules/overlays/hud/HUDDialogue.h	                        (rev 0)
+++ code/branches/Presentation_HS16/src/modules/overlays/hud/HUDDialogue.h	2016-12-19 07:15:56 UTC (rev 11347)
@@ -0,0 +1,38 @@
+
+
+#ifndef _HUDDialogue_H__
+#define _HUDDialogue_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <string>
+
+#include "util/OgreForwardRefs.h"
+#include "overlays/OrxonoxOverlay.h"
+#include "tools/Timer.h"
+
+namespace orxonox
+{
+	class _OverlaysExport HUDDialogue : public OrxonoxOverlay
+    {
+    	public:
+            HUDDialogue(Context* context); //!< Default Constructor.
+            virtual ~HUDDialogue(); //!< Destructor.
+
+            /**
+            @brief Sets the active picture.
+            */
+            virtual void updateTarget(std::string portrait);
+            /**
+            @brief Sets the picture to invivsible when Dialogue is over.
+            */
+            virtual void invisible();
+
+      private:
+      			Ogre::PanelOverlayElement* overlayElementIcon_;
+
+      			Timer portraitTimer; //!< The Timer which is used to set the picture back to invisible.
+    };
+}
+#endif
\ No newline at end of file




More information about the Orxonox-commit mailing list