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

dmoritz at orxonox.net dmoritz at orxonox.net
Mon Oct 24 16:06:37 CEST 2016


Author: dmoritz
Date: 2016-10-24 16:06:37 +0200 (Mon, 24 Oct 2016)
New Revision: 11247

Added:
   code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc
   code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h
Modified:
   code/branches/Dialog_HS16/data/levels/missionOne.oxw
   code/branches/Dialog_HS16/src/modules/notifications/dispatchers/CMakeLists.txt
Log:
New Dialogue Class

Modified: code/branches/Dialog_HS16/data/levels/missionOne.oxw
===================================================================
--- code/branches/Dialog_HS16/data/levels/missionOne.oxw	2016-10-24 14:06:00 UTC (rev 11246)
+++ code/branches/Dialog_HS16/data/levels/missionOne.oxw	2016-10-24 14:06:37 UTC (rev 11247)
@@ -23,6 +23,8 @@
 <Level
  gametype     = "Mission"
 >
+  <Dialogue message="test">
+    </Dialogue>
   <templates>
     <Template link=lodtemplate_default />
   </templates>
@@ -408,13 +410,13 @@
 <!-------------------------------------- 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 message="Let's fly to the blinking light.">
         <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.">

Modified: code/branches/Dialog_HS16/src/modules/notifications/dispatchers/CMakeLists.txt
===================================================================
--- code/branches/Dialog_HS16/src/modules/notifications/dispatchers/CMakeLists.txt	2016-10-24 14:06:00 UTC (rev 11246)
+++ code/branches/Dialog_HS16/src/modules/notifications/dispatchers/CMakeLists.txt	2016-10-24 14:06:37 UTC (rev 11247)
@@ -1,4 +1,5 @@
 ADD_SOURCE_FILES(NOTIFICATIONS_SRC_FILES
   CommandNotification.cc
   SimpleNotification.cc
+  Dialogue.cc
 )

Added: code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc
===================================================================
--- code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc	                        (rev 0)
+++ code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc	2016-10-24 14:06:37 UTC (rev 11247)
@@ -0,0 +1,28 @@
+
+
+#include "Dialogue.h"
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox{
+	
+	RegisterClass(Dialogue);
+
+	Dialogue::Dialogue(Context* context):BaseObject(context){
+		RegisterObject(Dialogue);
+
+	}
+
+	Dialogue::~Dialogue()
+    {
+
+    }
+    void Dialogue::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Dialogue, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Dialogue, "message", setMessage, getMessage, xmlelement, mode);
+        orxout()<<"blablab";
+    }
+}
\ No newline at end of file

Added: code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h
===================================================================
--- code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h	                        (rev 0)
+++ code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h	2016-10-24 14:06:37 UTC (rev 11247)
@@ -0,0 +1,32 @@
+
+#ifndef _Dialogue_H__
+#define _Dialogue_H__
+#include <string>	
+#include "core/BaseObject.h"
+
+namespace orxonox{
+
+class Dialogue: public BaseObject{
+
+	public:
+            Dialogue(Context* context); //!< Default Constructor.
+            virtual ~Dialogue(); //!< Destructor.
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            const std::string& getMessage(void)
+                { return this->message_; }
+
+            void setMessage(const std::string& message)
+                { this->message_ = message; }
+
+    protected:
+    	virtual const std::string& createNotificationMessage(void)
+                { return this->message_; }
+    private:
+    		std::string message_;
+        } ;       
+
+}
+
+#endif 
\ No newline at end of file




More information about the Orxonox-commit mailing list