[Orxonox-commit 6621] r11261 - in code/branches/Dialog_HS16: data/levels src/modules/notifications src/modules/notifications/dispatchers

dmoritz at orxonox.net dmoritz at orxonox.net
Mon Oct 31 16:11:28 CET 2016


Author: dmoritz
Date: 2016-10-31 16:11:28 +0100 (Mon, 31 Oct 2016)
New Revision: 11261

Modified:
   code/branches/Dialog_HS16/data/levels/missionOne.oxw
   code/branches/Dialog_HS16/src/modules/notifications/NotificationDispatcher.h
   code/branches/Dialog_HS16/src/modules/notifications/NotificationManager.h
   code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc
   code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h
Log:
Updated Dialogue Class

Modified: code/branches/Dialog_HS16/data/levels/missionOne.oxw
===================================================================
--- code/branches/Dialog_HS16/data/levels/missionOne.oxw	2016-10-31 15:09:44 UTC (rev 11260)
+++ code/branches/Dialog_HS16/data/levels/missionOne.oxw	2016-10-31 15:11:28 UTC (rev 11261)
@@ -23,8 +23,6 @@
 <Level
  gametype     = "Mission"
 >
-  <Dialogue message="test">
-    </Dialogue>
   <templates>
     <Template link=lodtemplate_default />
   </templates>
@@ -32,7 +30,7 @@
 
   <NotificationQueueCEGUI
     name="narrative"
-    targets="simpleNotification"
+    targets="simpleNotification,dialogue"
     size=3
     displayTime=3.9
     position="0.2, 0, 0.1, 0"
@@ -41,6 +39,7 @@
     alignment="HorzCentred"
     displaySize="0.6, 0, 0, 0"
     />
+
   <Scene
     ambientlight = "0.8, 0.8, 0.8"
     skybox       = "Orxonox/Starbox"
@@ -371,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 message="Press (F3) to see your mission briefing.">
         <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">
@@ -410,13 +409,13 @@
 <!-------------------------------------- PART ZERO: How to fly --------------------------------------->
 
     <DistanceTrigger name="flying1" position="800,700,600" target="Pawn" distance=10 stayActive="true" delay=6/>
-    <Dialogue message="Let's fly to the blinking light.">
+    <SimpleNotification message="Let's fly to the blinking light.">
         <events>
             <trigger>
                 <EventListener event="flying1" />
             </trigger>
         </events>
-    </Dialogue>
+    </SimpleNotification>
 
     <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.">
@@ -433,13 +432,13 @@
     </DistanceTrigger>
 
 
-    <SimpleNotification message="Three arrows just appeared.">
+    <Dialogue message="Three arrows just appeared.">
         <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.">

Modified: code/branches/Dialog_HS16/src/modules/notifications/NotificationDispatcher.h
===================================================================
--- code/branches/Dialog_HS16/src/modules/notifications/NotificationDispatcher.h	2016-10-31 15:09:44 UTC (rev 11260)
+++ code/branches/Dialog_HS16/src/modules/notifications/NotificationDispatcher.h	2016-10-31 15:11:28 UTC (rev 11261)
@@ -125,6 +125,8 @@
             */
             virtual const std::string& createNotificationMessage(void)
                 { return BLANKSTRING; }
+            virtual const std::string& createNotificationSpeaker(void)
+                { return BLANKSTRING; }
 
     };
 

Modified: code/branches/Dialog_HS16/src/modules/notifications/NotificationManager.h
===================================================================
--- code/branches/Dialog_HS16/src/modules/notifications/NotificationManager.h	2016-10-31 15:09:44 UTC (rev 11260)
+++ code/branches/Dialog_HS16/src/modules/notifications/NotificationManager.h	2016-10-31 15:11:28 UTC (rev 11261)
@@ -93,7 +93,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/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc
===================================================================
--- code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc	2016-10-31 15:09:44 UTC (rev 11260)
+++ code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc	2016-10-31 15:11:28 UTC (rev 11261)
@@ -9,9 +9,14 @@
 	
 	RegisterClass(Dialogue);
 
-	Dialogue::Dialogue(Context* context):BaseObject(context){
+	Dialogue::Dialogue(Context* context):NotificationDispatcher(context){
 		RegisterObject(Dialogue);
 
+		this->setSender("dialogue");
+
+        this->setSyncMode(ObjectDirection::None);
+
+
 	}
 
 	Dialogue::~Dialogue()
@@ -23,6 +28,7 @@
         SUPER(Dialogue, XMLPort, xmlelement, mode);
 
         XMLPortParam(Dialogue, "message", setMessage, getMessage, xmlelement, mode);
-        orxout()<<"blablab";
+        //XMLPortParam(Dialogue, "speaker", setSpeaker, getSpeaker, xmlelement, mode);
+        
     }
 }
\ No newline at end of file

Modified: code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h
===================================================================
--- code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h	2016-10-31 15:09:44 UTC (rev 11260)
+++ code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h	2016-10-31 15:11:28 UTC (rev 11261)
@@ -2,11 +2,15 @@
 #ifndef _Dialogue_H__
 #define _Dialogue_H__
 #include <string>	
-#include "core/BaseObject.h"
+//#include "core/BaseObject.h"
 
+#include "notifications/NotificationsPrereqs.h"
+
+#include "notifications/NotificationDispatcher.h"
+
 namespace orxonox{
 
-class Dialogue: public BaseObject{
+class _NotificationsExport Dialogue: public NotificationDispatcher{
 
 	public:
             Dialogue(Context* context); //!< Default Constructor.
@@ -16,15 +20,22 @@
 
             const std::string& getMessage(void)
                 { return this->message_; }
+         //   const std::string& getSpeaker(void)
+            //	{return this->speaker_;}
 
-            void setMessage(const std::string& message)
-                { this->message_ = message; }
-
     protected:
     	virtual const std::string& createNotificationMessage(void)
                 { return this->message_; }
+       // virtual const std::string& createNotificationSpeaker(void)
+        //		{ return this->speaker_; }
     private:
     		std::string message_;
+    	//	std::string speaker_;
+
+    		void setMessage(const std::string& message)
+                { this->message_ = message; }
+           // void setSpeaker(const std::string& speaker)
+            //	{ this->speaker_ = speaker;}
         } ;       
 
 }




More information about the Orxonox-commit mailing list