pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3641 - trunk/pingus/src


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3641 - trunk/pingus/src
Date: Thu, 3 Jul 2008 06:14:44 +0200

Author: grumbel
Date: 2008-07-03 06:14:43 +0200 (Thu, 03 Jul 2008)
New Revision: 3641

Modified:
   trunk/pingus/src/demo_session.cpp
   trunk/pingus/src/demo_session.hpp
Log:
Implemented Demo restart button

Modified: trunk/pingus/src/demo_session.cpp
===================================================================
--- trunk/pingus/src/demo_session.cpp   2008-07-03 04:10:26 UTC (rev 3640)
+++ trunk/pingus/src/demo_session.cpp   2008-07-03 04:14:43 UTC (rev 3641)
@@ -72,8 +72,9 @@
   }
 };
 
-DemoSession::DemoSession(const Pathname& pathname)
-  : pause(false),
+DemoSession::DemoSession(const Pathname& pathname_)
+  : pathname(pathname_),
+    pause(false),
     fast_forward(false)
 {
   // Load Demo file
@@ -221,7 +222,7 @@
 void
 DemoSession::restart()
 {
-  std::cout << "DemoSession::restart(): unimplemented" << std::endl;
+  ScreenManager::instance()->replace_screen(new DemoSession(pathname), true);
 }
 
 /* EOF */

Modified: trunk/pingus/src/demo_session.hpp
===================================================================
--- trunk/pingus/src/demo_session.hpp   2008-07-03 04:10:26 UTC (rev 3640)
+++ trunk/pingus/src/demo_session.hpp   2008-07-03 04:14:43 UTC (rev 3641)
@@ -41,6 +41,8 @@
 class DemoSession : public GUIScreen
 {
 private:
+  Pathname pathname;
+
   std::auto_ptr<Server>     server;
   std::auto_ptr<PingusDemo> demo;
   std::vector<ServerEvent>  events;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]